Skip to content

Commit d3dc212

Browse files
authored
[Driver][SYCL] Do not imply defaultlib msvcrt for Linux based driver on Windows (#3827)
When compiling for Windows target, we should only be adding the defaultlib msvcrt directive when performing MSVC compatible compilations. If adding msvcrt for Linux style compilations, we do not know if the library should be the regular library or the debug library, as that is determined by the use of /MD or /MDd.
1 parent 70281ea commit d3dc212

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -4703,7 +4703,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
47034703
if (AuxT.isWindowsMSVCEnvironment()) {
47044704
CmdArgs.push_back("-D_MT");
47054705
CmdArgs.push_back("-D_DLL");
4706-
CmdArgs.push_back("--dependent-lib=msvcrt");
47074706
}
47084707
}
47094708
}

clang/test/Driver/sycl-MD-default.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// RUN: %clangxx -### -fsycl -c -target x86_64-unknown-windows-msvc %s 2>&1 \
66
// RUN: | FileCheck -check-prefix=CHK-DEFAULT %s
77
// CHK-DEFAULT-NOT: "-fsycl-is-device" {{.*}} "-D_MT" "-D_DLL"
8-
// CHK-DEFAULT: "-fsycl-is-host"{{.*}} "-D_MT" "-D_DLL" "--dependent-lib=msvcrt{{d*}}" {{.*}}
8+
// CHK-DEFAULT: "-fsycl-is-host"{{.*}} "-D_MT" "-D_DLL"
99

1010
// RUN: %clang_cl -### -fsycl -c %s 2>&1 \
1111
// RUN: | FileCheck -check-prefix=CHK-DEFAULT-CL %s

0 commit comments

Comments
 (0)