diff --git a/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp b/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp --- a/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp +++ b/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp @@ -570,6 +570,10 @@ Conf.CGFileType = (Triple.isNVPTX() || SaveTemps) ? CGFT_AssemblyFile : CGFT_ObjectFile; + // We consider the GPU to be a freestanding target so we shouldn't emit any + // builtin library calls. + Conf.Freestanding = true; + // TODO: Handle remark files Conf.HasWholeProgramVisibility = Args.hasArg(OPT_whole_program);