forked from implicitfield/llvm-macos-buildbot
-
Notifications
You must be signed in to change notification settings - Fork 1
/
4dec62f4d4a0a496a8067e283bf66897fbf6e598.patch
35 lines (34 loc) · 1.44 KB
/
4dec62f4d4a0a496a8067e283bf66897fbf6e598.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
--- a/compiler-rt/lib/builtins/CMakeLists.txt
+++ b/compiler-rt/lib/builtins/CMakeLists.txt
@@ -567,9 +567,13 @@ foreach(pat cas swp ldadd ldclr ldeor ldset)
foreach(size 1 2 4 8 16)
foreach(model 1 2 3 4 5)
if(pat STREQUAL "cas" OR NOT size STREQUAL "16")
+ set(source_asm "${CMAKE_CURRENT_SOURCE_DIR}/aarch64/lse.S")
set(helper_asm "${OA_HELPERS_DIR}/outline_atomic_${pat}${size}_${model}.S")
- list(APPEND lse_builtins "${helper_asm}")
- list(APPEND arm64_lse_commands COMMAND ${CMAKE_COMMAND} -E ${COMPILER_RT_LINK_OR_COPY} "${CMAKE_CURRENT_SOURCE_DIR}/aarch64/lse.S" "${helper_asm}")
+ add_custom_command(
+ OUTPUT "${helper_asm}"
+ COMMAND ${CMAKE_COMMAND} -E ${COMPILER_RT_LINK_OR_COPY} "${source_asm}" "${helper_asm}"
+ DEPENDS "${source_asm}"
+ )
set_source_files_properties("${helper_asm}"
PROPERTIES
COMPILE_DEFINITIONS "L_${pat};SIZE=${size};MODEL=${model}"
@@ -827,16 +831,6 @@ else ()
list(APPEND BUILTIN_CFLAGS_${arch} -fforce-enable-int128)
endif()
- if(arch STREQUAL "aarch64")
- add_custom_target(
- lse_builtin_symlinks
- BYPRODUCTS ${lse_builtins}
- ${arm64_lse_commands}
- )
-
- set(deps_aarch64 lse_builtin_symlinks)
- endif()
-
add_compiler_rt_runtime(clang_rt.builtins
STATIC
ARCHS ${arch}