[compiler-rt] a2a5144 - [compiler-rt][bultins] Fix libatomic standalone build
Alex Brachet via llvm-commits
llvm-commits at lists.llvm.org
Tue May 30 11:19:44 PDT 2023
Author: Alex Brachet
Date: 2023-05-30T18:19:36Z
New Revision: a2a51448c1c34ee1cd1c3ec3689e7a354bb0df7c
URL: https://github.com/llvm/llvm-project/commit/a2a51448c1c34ee1cd1c3ec3689e7a354bb0df7c
DIFF: https://github.com/llvm/llvm-project/commit/a2a51448c1c34ee1cd1c3ec3689e7a354bb0df7c.diff
LOG: [compiler-rt][bultins] Fix libatomic standalone build
Differential Revision: https://reviews.llvm.org/D151679
Added:
Modified:
compiler-rt/lib/builtins/CMakeLists.txt
Removed:
################################################################################
diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt
index c3e22a8f354fc..66d11938d38ac 100644
--- a/compiler-rt/lib/builtins/CMakeLists.txt
+++ b/compiler-rt/lib/builtins/CMakeLists.txt
@@ -861,19 +861,17 @@ option(COMPILER_RT_BUILD_STANDALONE_LIBATOMIC
if(COMPILER_RT_BUILD_STANDALONE_LIBATOMIC)
add_custom_target(builtins-standalone-atomic)
- set(BUILTIN_DEPS "")
set(BUILTIN_TYPE SHARED)
if(${CMAKE_SYSTEM_NAME} MATCHES "AIX")
if(NOT COMPILER_RT_LIBATOMIC_LINK_FLAGS)
get_aix_libatomic_default_link_flags(COMPILER_RT_LIBATOMIC_LINK_FLAGS
"${CMAKE_CURRENT_SOURCE_DIR}/ppc/atomic.exp")
endif()
- # The compiler needs builtins to link any other binaries, so let
- # clang_rt.atomic be built after builtins.
- set(BUILTIN_DEPS builtins)
# For
diff erent versions of cmake, SHARED behaves
diff erently. For some
# versions, we might need MODULE rather than SHARED.
get_aix_libatomic_type(BUILTIN_TYPE)
+ else()
+ list(APPEND COMPILER_RT_LIBATOMIC_LINK_FLAGS -nodefaultlibs)
endif()
foreach (arch ${BUILTIN_SUPPORTED_ARCH})
if(CAN_TARGET_${arch})
@@ -882,7 +880,7 @@ if(COMPILER_RT_BUILD_STANDALONE_LIBATOMIC)
ARCHS ${arch}
SOURCES atomic.c
LINK_FLAGS ${COMPILER_RT_LIBATOMIC_LINK_FLAGS}
- DEPS ${BUILTIN_DEPS}
+ DEPS builtins
PARENT_TARGET builtins-standalone-atomic)
endif()
endforeach()
More information about the llvm-commits
mailing list