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. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@124052 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5f5859c45b
commit
e76496ce46
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user