Line
Link Here
|
0 |
-- /clang/lib/Basic/CMakeLists.txt |
0 |
++ /clang/lib/Basic/CMakeLists.txt |
Lines 110-112
Link Here
|
110 |
omp_gen |
110 |
omp_gen |
111 |
) |
111 |
) |
112 |
|
112 |
|
|
|
113 |
# libclangBasic compiled by GCC at least on 32-bit PowerPC may contain reference |
114 |
# to __atomic_load_8. |
115 |
# Link against library libatomic provided by GCC. |
116 |
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") |
117 |
# Use options --push-state, --as-needed and --pop-state if linker is known |
118 |
# to support them. |
119 |
# Use single option -Wl of compiler driver to avoid incorrect re-ordering |
120 |
# of options by CMake. |
121 |
if (LLVM_LINKER_IS_GNULD OR LLVM_LINKER_IS_GOLD OR LLVM_LINKER_IS_LLD OR LLVM_LINKER_IS_MOLD) |
122 |
target_link_libraries(clangBasic |
123 |
PRIVATE |
124 |
"-Wl,--push-state,--as-needed,-latomic,--pop-state" |
125 |
) |
126 |
else() |
127 |
target_link_libraries(clangBasic |
128 |
PRIVATE |
129 |
atomic |
130 |
) |
131 |
endif() |
132 |
endif() |