summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-01-23 01:05:20 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-01-23 01:05:20 +0000
commitce395a9acdcab4a38e27fa18534b0b9e6c8d9cb0 (patch)
treefefc74747bb30d5b04602fc729588919779e8e43
parent1b03cb5d1b18b1843dcfe010cbf38a1d643dc34b (diff)
downloadbcm5719-llvm-ce395a9acdcab4a38e27fa18534b0b9e6c8d9cb0.tar.gz
bcm5719-llvm-ce395a9acdcab4a38e27fa18534b0b9e6c8d9cb0.zip
Teach the Lit configuration to actually use the cxx0x setting when
constructing compile flags, and to link against the 'rt' library on Linux for clock_gettime and friends. llvm-svn: 124052
-rw-r--r--libcxx/test/lit.cfg9
1 files changed, 7 insertions, 2 deletions
diff --git a/libcxx/test/lit.cfg b/libcxx/test/lit.cfg
index 9feeee2f91a..d8023fd9e16 100644
--- a/libcxx/test/lit.cfg
+++ b/libcxx/test/lit.cfg
@@ -134,16 +134,21 @@ if libcxx_obj_root is not None:
else:
libcxx_obj_root = "/usr"
+# Configure extra compiler flags.
+compile_flags = []
+if getattr(config, 'cxx_has_stdcxx0x_flag', False):
+ compile_flags += ['-std=c++0x']
+
# Configure extra libraries.
libraries = []
if sys.platform == 'darwin':
libraries += ['-lSystem']
if sys.platform == 'linux2':
- libraries += ['-lgcc_eh', '-lsupc++', '-lc', '-lm', '-lgcc_s']
+ libraries += ['-lgcc_eh', '-lsupc++', '-lc', '-lm', '-lrt', '-lgcc_s']
libraries += ['-Wl,-R', libcxx_obj_root + '/lib']
config.test_format = LibcxxTestFormat(cxx_under_test,
- cpp_flags = ['-nostdinc++'] + include_paths,
+ cpp_flags = ['-nostdinc++'] + compile_flags + include_paths,
ld_flags = ['-nodefaultlibs'] + library_paths + ['-lc++'] + libraries)
config.target_triple = None
OpenPOWER on IntegriCloud