diff --git a/tests/std/tests/P1502R1_standard_library_header_units/custom_format.py b/tests/std/tests/P1502R1_standard_library_header_units/custom_format.py index 3c7acccbe55..9c5c3858e9f 100644 --- a/tests/std/tests/P1502R1_standard_library_header_units/custom_format.py +++ b/tests/std/tests/P1502R1_standard_library_header_units/custom_format.py @@ -98,19 +98,21 @@ def getBuildSteps(self, test, litConfig, shared): test.flags.remove('/BE') test.compileFlags.remove('/BE') + exportHeaderOptions = ['/exportHeader', '/Fo', '/MP'] headerUnitOptions = [] for header in stlHeaders: - headerObjPath = os.path.join(outputDir, header + '.obj') + headerAbsolutePath = os.path.join(litConfig.cxx_headers, header) + + exportHeaderOptions.append(headerAbsolutePath) headerUnitOptions.append('/headerUnit') - headerUnitOptions.append('{0}/{1}={1}.ifc'.format(litConfig.cxx_headers, header)) + headerUnitOptions.append('{0}={1}.ifc'.format(headerAbsolutePath, header)) if not compileTestCppWithEdg: - headerUnitOptions.append(headerObjPath) + headerUnitOptions.append(os.path.join(outputDir, header + '.obj')) - cmd = [test.cxx, *test.flags, *test.compileFlags, - '/exportHeader', '<{}>'.format(header), '/Fo{}'.format(headerObjPath)] - yield TestStep(cmd, shared.execDir, shared.env, False) + cmd = [test.cxx, *test.flags, *test.compileFlags, *exportHeaderOptions] + yield TestStep(cmd, shared.execDir, shared.env, False) if compileTestCppWithEdg: test.compileFlags.append('/BE') diff --git a/tests/std/tests/P1502R1_standard_library_header_units/custombuild.pl b/tests/std/tests/P1502R1_standard_library_header_units/custombuild.pl index 403af1be04b..b0b03595c17 100644 --- a/tests/std/tests/P1502R1_standard_library_header_units/custombuild.pl +++ b/tests/std/tests/P1502R1_standard_library_header_units/custombuild.pl @@ -88,18 +88,19 @@ () "version", ); + my $export_header_options = "/exportHeader /Fo /MP"; my $header_unit_options = ""; foreach (@stl_headers) { + $export_header_options .= " $stl_include_dir/$_"; + $header_unit_options .= " /headerUnit"; $header_unit_options .= " $stl_include_dir/$_=$_.ifc"; $header_unit_options .= " $_.obj"; - - # TRANSITION, remove /DMSVC_INTERNAL_TESTING after all compiler bugs are fixed - Run::ExecuteCL("/DMSVC_INTERNAL_TESTING /exportHeader \"<$_>\" /Fo$_.obj"); } # TRANSITION, remove /DMSVC_INTERNAL_TESTING after all compiler bugs are fixed + Run::ExecuteCL("/DMSVC_INTERNAL_TESTING $export_header_options"); Run::ExecuteCL("/DMSVC_INTERNAL_TESTING test.cpp /Fe$cwd.exe $header_unit_options"); } 1