Skip to content

Commit 8294d83

Browse files
committed
[Driver][UEFI] Enable Microsoft extensions
Enable microsoft extensions for UEFI targets.
1 parent 5643bbd commit 8294d83

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5109,6 +5109,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
51095109
const llvm::Triple *AuxTriple =
51105110
(IsCuda || IsHIP) ? TC.getAuxTriple() : nullptr;
51115111
bool IsWindowsMSVC = RawTriple.isWindowsMSVCEnvironment();
5112+
bool IsUEFI = RawTriple.isUEFI();
51125113
bool IsIAMCU = RawTriple.isOSIAMCU();
51135114

51145115
// Adjust IsWindowsXYZ for CUDA/HIP/SYCL compilations. Even when compiling in
@@ -7252,7 +7253,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
72527253

72537254
// -fms-extensions=0 is default.
72547255
if (Args.hasFlag(options::OPT_fms_extensions, options::OPT_fno_ms_extensions,
7255-
IsWindowsMSVC))
7256+
IsWindowsMSVC || IsUEFI))
72567257
CmdArgs.push_back("-fms-extensions");
72577258

72587259
// -fms-compatibility=0 is default.

0 commit comments

Comments
 (0)