[libc++] Add support for a new keyword ADDITIONAL_COMPILE_FLAGS
authorLouis Dionne <ldionne@apple.com>
Mon, 30 Mar 2020 16:00:28 +0000 (12:00 -0400)
committerLouis Dionne <ldionne@apple.com>
Mon, 30 Mar 2020 16:40:48 +0000 (12:40 -0400)
commit32c9efb423035ef7c5db6cb6e7b68ac935a8d15b
tree403db49d186de381dde7df14ca9be4b594a13975
parent2d19270efcf01672c8eaab1ccb0e5b89ea953cc9
[libc++] Add support for a new keyword ADDITIONAL_COMPILE_FLAGS

This allows adding compilation flags for a single test, which can help
eliminate some .sh.cpp tests and some custom handling in the libc++
test format.

It also works around the issue that .sh.cpp substitutions are _not_
equivalent to the actual compiler command lines used to compile tests,
since the compiler flags can be modified in local lit configurations,
and substitutions are frozen at that point. For example using %{compile}
in a .sh.cpp test in the coroutines subdirectory will not include the
-fcoroutines-ts flag, which is added in the local lit config, because
the %{compile} substitution is created long before we add -fcoroutines-ts
to the compiler flags (in the lit.local.cfg for coroutines).
libcxx/test/libcxx/input.output/filesystems/class.directory_entry/directory_entry.mods/last_write_time.pass.cpp [moved from libcxx/test/libcxx/input.output/filesystems/class.directory_entry/directory_entry.mods/last_write_time.sh.cpp with 97% similarity]
libcxx/test/libcxx/selftest/test.arc.fail.mm
libcxx/test/libcxx/selftest/test.arc.pass.mm
libcxx/test/libcxx/type_traits/is_pointer.arc.pass.mm
libcxx/utils/libcxx/test/format.py