This patch refactors the structure for configuring all compiler flags to make it easier to run the test suite against non-standard configurations. It does so using the following LIT options:
- --param=no_default_flags: Disable ALL flags other than those explicitly specified with --param=compile_flags and --param=link_flags.
- --param=no_library_flags: Disable only the flags related to configuring the test suite for the just built libc++. This disables adding the include paths to the libc++ headers as well as the link flags relating to linking libc++ and the abi library.
The rational for these changes is:
- To fix a bug where no_default_flags currently doesn't disable *all* flags.
- To allow a user to run the test suite without having to manually define a bunch of flags that are always required (ex -Ipath/to/libcxx/test/support)
An example use case for these changes is running the test-suite against libstdc++. Previously you would have to use an invocation that looked something like:
lit -sv --param=no_default_flags=True --param=compile_flags='-I/path/to/libcxx/test/support -std=c++11' path/to/tests
Now you can simply use:
lit -sv --param=no_library_flags=True path/to/tests
This patch is useful to me when running the benchmarks against libstdc++.