Author: compnerd Date: Fri Feb 10 00:24:34 2017 New Revision: 294716 URL: http://llvm.org/viewvc/llvm-project?rev=294716&view=rev Log: test: allow -target usage on Windows
When running the tests on Windows with a debug build, _DEBUG must be added to the flags prior to the -target as the forced inclusion of a header will prevent the compile test for the flag to fail. Modified: libcxx/trunk/utils/libcxx/test/config.py Modified: libcxx/trunk/utils/libcxx/test/config.py URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/libcxx/test/config.py?rev=294716&r1=294715&r2=294716&view=diff ============================================================================== --- libcxx/trunk/utils/libcxx/test/config.py (original) +++ libcxx/trunk/utils/libcxx/test/config.py Fri Feb 10 00:24:34 2017 @@ -462,13 +462,17 @@ class Configuration(object): gcc_toolchain = self.get_lit_conf('gcc_toolchain') if gcc_toolchain: self.cxx.flags += ['-gcc-toolchain', gcc_toolchain] + # NOTE: the _DEBUG definition must preceed the triple check because for + # the Windows build of libc++, the forced inclusion of a header requires + # that _DEBUG is defined. Incorrect ordering will result in -target + # being elided. + if self.is_windows and self.debug_build: + self.cxx.compile_flags += ['-D_DEBUG'] if self.use_target: if not self.cxx.addFlagIfSupported( ['-target', self.config.target_triple]): self.lit_config.warning('use_target is true but -target is '\ 'not supported by the compiler') - if self.is_windows and self.debug_build: - self.cxx.compile_flags += ['-D_DEBUG'] def configure_compile_flags_header_includes(self): support_path = os.path.join(self.libcxx_src_root, 'test', 'support') _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits