Closed fsb4000 closed 1 week ago
Thanks, this is super awesome and will prevent a common problem for contributors! :heart_eyes_cat:
I pushed a major simplification of the logic and improved the output:
D:\GitHub\STL\out\x64>cl
Microsoft (R) C/C++ Optimizing Compiler Version 19.41.33923 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
usage: cl [ option... ] filename... [ /link linkoption... ]
D:\GitHub\STL\out\x64>python tests\utils\stl-lit\stl-lit.py -o testing.log -Dnotags=ASAN --order=random --succinct %STL%\tests\std\tests\P0295R0_gcd_lcm
Target platform mismatch: the STL was built for x64 but tested for x86.
This works because CMake's configure_file
transformations bake build_platform = '$ENV{Platform}'
into out\x64\tests\utils\stl-lit\stl-lit.py
containing:
def assert_same_platform_for_build_and_test():
build_platform = 'x64'
test_platform = os.getenv('Platform', default='')
I also verified the reverse failure case, and successful cases.
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.
Thanks for preventing this common early headache for contributors! :adhesive_bandage: :hospital: :tada:
Fixes #4639