Skip to content

Commit 567708c

Browse files
committed
Further support changes for aarch64
1 parent 5bd7436 commit 567708c

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
lines changed

clang/lib/Basic/Targets/AArch64.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,6 @@ class LLVM_LIBRARY_VISIBILITY UEFIAArch64TargetInfo
357357
public:
358358
UEFIAArch64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
359359
: UEFITargetInfo<AArch64leTargetInfo>(Triple, Opts) {
360-
llvm::outs() << "In targetinfo constructor\n";
361360
this->TheCXXABI.set(TargetCXXABI::Microsoft);
362361
// This is an LLP64 platform.
363362
// int:4, long:4, long long:8, long double:8.

clang/lib/Basic/Targets/OSTargets.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,6 @@ class LLVM_LIBRARY_VISIBILITY UEFITargetInfo : public OSTargetInfo<Target> {
848848
protected:
849849
void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
850850
MacroBuilder &Builder) const override {
851-
llvm::outs() << "define macro \n";
852851
Builder.defineMacro("__UEFI__");
853852
}
854853

clang/lib/CodeGen/CodeGenModule.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ createTargetCodeGenInfo(CodeGenModule &CGM) {
141141
AArch64ABIKind Kind = AArch64ABIKind::AAPCS;
142142
if (Target.getABI() == "darwinpcs")
143143
Kind = AArch64ABIKind::DarwinPCS;
144-
else if (Triple.isOSWindows())
144+
else if (Triple.isOSWindows() || Triple.isUEFI())
145145
return createWindowsAArch64TargetCodeGenInfo(CGM, AArch64ABIKind::Win64);
146146
else if (Target.getABI() == "aapcs-soft")
147147
Kind = AArch64ABIKind::AAPCSSoft;

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7082,8 +7082,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
70827082
// -fms-compatibility=0 is default.
70837083
bool IsMSVCCompat = Args.hasFlag(
70847084
options::OPT_fms_compatibility, options::OPT_fno_ms_compatibility,
7085-
(IsWindowsMSVC && Args.hasFlag(options::OPT_fms_extensions,
7086-
options::OPT_fno_ms_extensions, true)));
7085+
((IsWindowsMSVC || IsUEFI) &&
7086+
Args.hasFlag(options::OPT_fms_extensions, options::OPT_fno_ms_extensions,
7087+
true)));
70877088
if (IsMSVCCompat) {
70887089
CmdArgs.push_back("-fms-compatibility");
70897090
if (!types::isCXX(Input.getType()) &&

llvm/lib/Target/AArch64/AArch64MCInstLower.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ MCSymbol *AArch64MCInstLower::GetGlobalValueSymbol(const GlobalValue *GV,
5050
return Printer.getSymbolPreferLocal(*GV);
5151

5252
assert((TheTriple.isOSWindows() || TheTriple.isUEFI()) &&
53-
"Windows is the only supported COFF target");
53+
"Windows and UEFI are the only supported COFF targets");
5454

5555
bool IsIndirect =
5656
(TargetFlags & (AArch64II::MO_DLLIMPORT | AArch64II::MO_COFFSTUB));

0 commit comments

Comments
 (0)