зеркало из https://github.com/microsoft/STL.git
Build header units in parallel (#1529)
This commit is contained in:
Родитель
839c21c4f3
Коммит
04369fcf3b
|
@ -98,19 +98,21 @@ class CustomTestFormat(STLTestFormat):
|
|||
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')
|
||||
|
|
|
@ -88,18 +88,19 @@ sub CustomBuildHook()
|
|||
"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
|
||||
|
|
Загрузка…
Ссылка в новой задаче