Skip to content

Commit 47d9fbc

Browse files
committed
[LinkerWrapper] Add 'Freestanding' config to the LTO pass
Summary: These GPU images are expected to be freestanding, so we should disable emission of builtins for whatever target we are offloading to.
1 parent 14043d4 commit 47d9fbc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,7 @@ std::unique_ptr<lto::LTO> createLTO(
526526

527527
Conf.CPU = Arch.str();
528528
Conf.Options = codegen::InitTargetOptionsFromCodeGenFlags(Triple);
529+
Conf.Freestanding = true;
529530

530531
StringRef OptLevel = Args.getLastArgValue(OPT_opt_level, "O2");
531532
Conf.MAttrs = Features;

0 commit comments

Comments
 (0)