diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a01ce02bd8c..98f36d52a6b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -11,6 +11,7 @@ pr: stages: - stage: Code_Format + dependsOn: [] displayName: 'Code Format' pool: name: ${{ variables.poolName }} @@ -18,9 +19,9 @@ stages: jobs: - template: azure-devops/format-validation.yml - - stage: Early_Build_x64 + - stage: Build_x64 dependsOn: [] - displayName: 'Early Build x64' + displayName: 'Build x64' pool: name: ${{ variables.poolName }} demands: ${{ variables.poolDemands }} @@ -35,9 +36,9 @@ stages: numShards: 1 skipTesting: true - - stage: Early_Build_x86 + - stage: Build_x86 dependsOn: [] - displayName: 'Early Build x86' + displayName: 'Build x86' pool: name: ${{ variables.poolName }} demands: ${{ variables.poolDemands }} @@ -52,9 +53,9 @@ stages: numShards: 1 skipTesting: true - - stage: Early_Build_ARM64 + - stage: Build_ARM64_Cross dependsOn: [] - displayName: 'Early Build ARM64' + displayName: 'Build ARM64 (Cross)' pool: name: ${{ variables.poolName }} demands: ${{ variables.poolDemands }} @@ -69,9 +70,9 @@ stages: numShards: 1 skipTesting: true - - stage: Early_Build_ARM64EC + - stage: Build_ARM64EC_Cross dependsOn: [] - displayName: 'Early Build ARM64EC' + displayName: 'Build ARM64EC (Cross)' pool: name: ${{ variables.poolName }} demands: ${{ variables.poolDemands }} @@ -86,14 +87,33 @@ stages: numShards: 1 skipTesting: true - - stage: Build_And_Test_x64 + # This ARM64-native build will detect problems with the ARM64 pool as early as possible. + # The stage dependencies are structured to optimize the critical path. + - stage: Build_ARM64_Native + dependsOn: [] + displayName: 'Build ARM64 (Native)' + pool: + name: ${{ variables.arm64PoolName }} + demands: ${{ variables.poolDemands }} + jobs: + - template: azure-devops/build-and-test.yml + parameters: + hostArch: arm64 + targetArch: arm64 + targetPlatform: arm64 + analyzeBuild: true + buildBenchmarks: true + numShards: 1 + skipTesting: true + + - stage: Test_x64 dependsOn: - Code_Format - - Early_Build_x64 - - Early_Build_x86 - - Early_Build_ARM64 - - Early_Build_ARM64EC - displayName: 'Build and Test x64' + - Build_x64 + - Build_x86 + - Build_ARM64_Cross + - Build_ARM64EC_Cross + displayName: 'Test x64' pool: name: ${{ variables.poolName }} demands: ${{ variables.poolDemands }} @@ -104,9 +124,9 @@ stages: targetArch: x64 targetPlatform: x64 - - stage: Build_And_Test_x86 - dependsOn: Build_And_Test_x64 - displayName: 'Build and Test x86' + - stage: Test_x86 + dependsOn: Test_x64 + displayName: 'Test x86' pool: name: ${{ variables.poolName }} demands: ${{ variables.poolDemands }} @@ -117,9 +137,11 @@ stages: targetArch: x86 targetPlatform: x86 - - stage: Build_And_Test_ARM64 - dependsOn: Build_And_Test_x64 - displayName: 'Build and Test ARM64' + - stage: Test_ARM64 + dependsOn: + - Build_ARM64_Native + - Test_x64 + displayName: 'Test ARM64' pool: name: ${{ variables.arm64PoolName }} demands: ${{ variables.poolDemands }} @@ -131,16 +153,18 @@ stages: targetPlatform: arm64 numShards: 10 - - stage: Build_And_Test_ARM64EC - dependsOn: Build_And_Test_x64 - displayName: 'Build and Test ARM64EC' + - stage: Test_ARM64EC + dependsOn: + - Build_ARM64_Native + - Test_x64 + displayName: 'Test ARM64EC' pool: - name: ${{ variables.poolName }} + name: ${{ variables.arm64PoolName }} demands: ${{ variables.poolDemands }} jobs: - template: azure-devops/build-and-test.yml parameters: - hostArch: x64 + hostArch: arm64 targetArch: arm64 targetPlatform: arm64ec - testsBuildOnly: true + numShards: 10 diff --git a/tests/std/include/test_header_units_and_modules.hpp b/tests/std/include/test_header_units_and_modules.hpp index bf79ffccab7..df85f9439e5 100644 --- a/tests/std/include/test_header_units_and_modules.hpp +++ b/tests/std/include/test_header_units_and_modules.hpp @@ -858,7 +858,9 @@ __declspec(dllexport) void test_stacktrace() { // export test_stacktrace to have desc.resize(pos); } +#ifndef _M_ARM64EC // TRANSITION, GH-5830 assert(desc == "test_stacktrace"); +#endif // ^^^ no workaround ^^^ } #endif // TEST_STANDARD >= 23 diff --git a/tests/std/tests/Dev09_158457_tr1_mem_fn_calling_conventions/test.cpp b/tests/std/tests/Dev09_158457_tr1_mem_fn_calling_conventions/test.cpp index 3598b041f87..900eade1983 100644 --- a/tests/std/tests/Dev09_158457_tr1_mem_fn_calling_conventions/test.cpp +++ b/tests/std/tests/Dev09_158457_tr1_mem_fn_calling_conventions/test.cpp @@ -136,7 +136,7 @@ const int free_correct = 444343; // x86 ijw const int member_correct = 2111121; // x86 pure const int free_correct = 433343; // x86 pure #endif -#elif defined(_M_X64) +#elif defined(_M_X64) && !defined(_M_ARM64EC) #if !defined(_M_CEE) const int member_correct = 2211112; // x64 native const int free_correct = 433334; // x64 native @@ -149,14 +149,14 @@ const int free_correct = 433343; // x64 pure #endif #else #if !defined(_M_CEE) -const int member_correct = 2211111; // arm64 native -const int free_correct = 433333; // arm64 native +const int member_correct = 2211111; // arm64/arm64ec native +const int free_correct = 433333; // arm64/arm64ec native #elif !defined(_M_CEE_PURE) -const int member_correct = 2211121; // arm64 ijw -const int free_correct = 433343; // arm64 ijw +const int member_correct = 2211121; // arm64/arm64ec ijw +const int free_correct = 433343; // arm64/arm64ec ijw #else -const int member_correct = 2111121; // arm64 pure -const int free_correct = 433343; // arm64 pure +const int member_correct = 2111121; // arm64/arm64ec pure +const int free_correct = 433343; // arm64/arm64ec pure #endif #endif diff --git a/tests/std/tests/P0811R3_midpoint_lerp/test.cpp b/tests/std/tests/P0811R3_midpoint_lerp/test.cpp index 1b97d1b40d9..ce17affe75d 100644 --- a/tests/std/tests/P0811R3_midpoint_lerp/test.cpp +++ b/tests/std/tests/P0811R3_midpoint_lerp/test.cpp @@ -1049,7 +1049,7 @@ void test_gh_1917() { ExceptGuard except; assert(bit_cast(lerp(2e+38f, 1e+38f, 4.0f)) == bit_cast(-2e+38f)); -#ifndef _M_ARM64 // TRANSITION, GH-5685 +#if !defined(_M_ARM64) && !defined(_M_ARM64EC) // TRANSITION, GH-5685 assert(check_feexcept(0)); #endif // ^^^ no workaround ^^^ } @@ -1066,7 +1066,7 @@ void test_gh_1917() { RoundGuard round{FE_UPWARD}; assert(bit_cast(lerp(2e+38f, 1e+38f, 4.0f)) == bit_cast(-2e+38f)); -#ifndef _M_ARM64 // TRANSITION, GH-5685 +#if !defined(_M_ARM64) && !defined(_M_ARM64EC) // TRANSITION, GH-5685 assert(check_feexcept(0)); #endif // ^^^ no workaround ^^^ } @@ -1082,7 +1082,7 @@ void test_gh_1917() { RoundGuard round{FE_DOWNWARD}; assert(bit_cast(lerp(2e+38f, 1e+38f, 4.0f)) == bit_cast(-2e+38f)); -#ifndef _M_ARM64 // TRANSITION, GH-5685 +#if !defined(_M_ARM64) && !defined(_M_ARM64EC) // TRANSITION, GH-5685 assert(check_feexcept(0)); #endif // ^^^ no workaround ^^^ } @@ -1098,7 +1098,7 @@ void test_gh_1917() { RoundGuard round{FE_TOWARDZERO}; assert(bit_cast(lerp(2e+38f, 1e+38f, 4.0f)) == bit_cast(-2e+38f)); -#ifndef _M_ARM64 // TRANSITION, GH-5685 +#if !defined(_M_ARM64) && !defined(_M_ARM64EC) // TRANSITION, GH-5685 assert(check_feexcept(0)); #endif // ^^^ no workaround ^^^ } diff --git a/tests/std/tests/P0881R7_stacktrace/test.cpp b/tests/std/tests/P0881R7_stacktrace/test.cpp index effe7cfe838..3a2f86217e9 100644 --- a/tests/std/tests/P0881R7_stacktrace/test.cpp +++ b/tests/std/tests/P0881R7_stacktrace/test.cpp @@ -13,7 +13,6 @@ #include #include #include -#include #ifdef HAS_EXPORT #define MAYBE_EXPORT __declspec(dllexport) @@ -309,8 +308,7 @@ void test_impl() { } int main() { -#if !(defined(__clang__) && defined(_M_ARM64)) // TRANSITION, LLVM-74530 - jthread t{test_impl}; +#if !((defined(__clang__) && defined(_M_ARM64)) || defined(_M_ARM64EC)) // TRANSITION, LLVM-74530, GH-5830 test_impl(); -#endif +#endif // ^^^ no workaround ^^^ } diff --git a/tests/universal_prefix.lst b/tests/universal_prefix.lst index b98fb54f8f5..c31e85f005a 100644 --- a/tests/universal_prefix.lst +++ b/tests/universal_prefix.lst @@ -1,4 +1,4 @@ # Copyright (c) Microsoft Corporation. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -* PM_CL="/nologo /Od /W4 /w14061 /w14242 /w14265 /w14582 /w14583 /w14587 /w14588 /w14749 /w14841 /w14842 /w15038 /w15214 /w15215 /w15216 /w15217 /w15262 /sdl /WX /D_ENABLE_STL_INTERNAL_CHECK /bigobj" PM_LINK="/MANIFEST:EMBED" +* PM_CL="/nologo /Od /W4 /w14061 /w14242 /w14265 /w14582 /w14583 /w14587 /w14588 /w14749 /w14841 /w14842 /w15038 /w15214 /w15215 /w15216 /w15217 /w15262 /sdl /WX /D_ENABLE_STL_INTERNAL_CHECK /bigobj" PM_LINK="/MANIFEST:EMBED /OPT:REF,NOICF" diff --git a/tests/utils/stl/test/tests.py b/tests/utils/stl/test/tests.py index 56206b65490..44d89d5ed97 100644 --- a/tests/utils/stl/test/tests.py +++ b/tests/utils/stl/test/tests.py @@ -245,6 +245,10 @@ def _handleEnvlst(self, litConfig): self.compileFlags.append('--target=arm64-pc-windows-msvc') elif (targetArch == 'arm64ec'.casefold()): self.compileFlags.append('--target=arm64ec-pc-windows-msvc') + # TRANSITION, GH-5825: As of Clang 20, compiling with `-fuse-ld=link` (avoiding lld-link) + # appears to be critically necessary for unknown reasons. + self.compileFlags.append('-fuse-ld=link') + self.linkFlags.append('/machine:arm64ec') elif ('nvcc'.casefold() in os.path.basename(cxx).casefold()): self._addCustomFeature('nvcc')