From f57a6050ef3183987a5f1b571361d9aaf6523997 Mon Sep 17 00:00:00 2001 From: Xiang Fan Date: Tue, 28 Jun 2022 16:28:31 -0700 Subject: [PATCH] Port MSVC-PR-407767 Allow passing additional compiler flags if the compiler is cl.exe. --- tests/std/run.pl | 6 ++++++ tests/tr1/run.pl | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/tests/std/run.pl b/tests/std/run.pl index e1995885020..004ae4ce689 100644 --- a/tests/std/run.pl +++ b/tests/std/run.pl @@ -31,6 +31,12 @@ $ENV{PM_COMPILER} .= " " . $ENV{CLANG_TARGET}; } +# add additional compiler flags if the compiler is cl.exe. +if (not $ENV{PM_COMPILER}) +{ + $ENV{CL} .= " " . $ENV{PM_CL_MSVC}; +} + my $RunPL = ""; if ($ENV{PM_CL} && $ENV{PM_CL} =~ m/[\-\/]BE / ) { diff --git a/tests/tr1/run.pl b/tests/tr1/run.pl index e1995885020..004ae4ce689 100644 --- a/tests/tr1/run.pl +++ b/tests/tr1/run.pl @@ -31,6 +31,12 @@ $ENV{PM_COMPILER} .= " " . $ENV{CLANG_TARGET}; } +# add additional compiler flags if the compiler is cl.exe. +if (not $ENV{PM_COMPILER}) +{ + $ENV{CL} .= " " . $ENV{PM_CL_MSVC}; +} + my $RunPL = ""; if ($ENV{PM_CL} && $ENV{PM_CL} =~ m/[\-\/]BE / ) {