diff options
author | Vasileios Kalintiris <Vasileios.Kalintiris@imgtec.com> | 2016-02-11 12:43:04 +0000 |
---|---|---|
committer | Vasileios Kalintiris <Vasileios.Kalintiris@imgtec.com> | 2016-02-11 12:43:04 +0000 |
commit | d247ac44cc9d52d7dfa15cb3d1785c554ea66e81 (patch) | |
tree | 26adedfce58aae7db6f64abbb86b7bade077c782 /libcxx/test | |
parent | 45c4d45ead268d66f754248e686dfdb735a79f9c (diff) | |
download | bcm5719-llvm-d247ac44cc9d52d7dfa15cb3d1785c554ea66e81.tar.gz bcm5719-llvm-d247ac44cc9d52d7dfa15cb3d1785c554ea66e81.zip |
Re-commit "Introduce a cmake module to figure out whether we need to link with libatomic."
This re-applies commit r260235. However, this time we add -gcc-toolchain
to the compiler's flags when the user has specified the LIBCXX_GCC_TOOLCHAIN
variable.
llvm-svn: 260515
Diffstat (limited to 'libcxx/test')
-rw-r--r-- | libcxx/test/CMakeLists.txt | 1 | ||||
-rw-r--r-- | libcxx/test/libcxx/test/target_info.py | 3 | ||||
-rw-r--r-- | libcxx/test/lit.site.cfg.in | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/libcxx/test/CMakeLists.txt b/libcxx/test/CMakeLists.txt index b67b3b43f83..88145534f7d 100644 --- a/libcxx/test/CMakeLists.txt +++ b/libcxx/test/CMakeLists.txt @@ -15,6 +15,7 @@ pythonize_bool(LIBCXX_ENABLE_SHARED) pythonize_bool(LIBCXX_BUILD_32_BITS) pythonize_bool(LIBCXX_GENERATE_COVERAGE) pythonize_bool(LIBCXXABI_USE_LLVM_UNWINDER) +pythonize_bool(LIBCXX_HAS_ATOMIC_LIB) # The tests shouldn't link to any ABI library when it has been linked into # libc++ statically or via a linker script. diff --git a/libcxx/test/libcxx/test/target_info.py b/libcxx/test/libcxx/test/target_info.py index 7ca08bea193..dc37f7108d3 100644 --- a/libcxx/test/libcxx/test/target_info.py +++ b/libcxx/test/libcxx/test/target_info.py @@ -172,6 +172,9 @@ class LinuxLocalTI(DefaultTargetInfo): flags += ['-lunwind', '-ldl'] else: flags += ['-lgcc_s', '-lgcc'] + use_libatomic = self.full_config.get_lit_bool('use_libatomic', False) + if use_libatomic: + flags += ['-latomic'] san = self.full_config.get_lit_conf('use_sanitizer', '').strip() if san: # The libraries and their order are taken from the diff --git a/libcxx/test/lit.site.cfg.in b/libcxx/test/lit.site.cfg.in index fa25834d111..9eb2b20a7dc 100644 --- a/libcxx/test/lit.site.cfg.in +++ b/libcxx/test/lit.site.cfg.in @@ -20,6 +20,7 @@ config.generate_coverage = "@LIBCXX_GENERATE_COVERAGE@" config.target_info = "@LIBCXX_TARGET_INFO@" config.executor = "@LIBCXX_EXECUTOR@" config.llvm_unwinder = "@LIBCXXABI_USE_LLVM_UNWINDER@" +config.use_libatomic = "@LIBCXX_HAS_ATOMIC_LIB@" # Let the main config do the real work. lit_config.load_config(config, "@LIBCXX_SOURCE_DIR@/test/lit.cfg") |