Skip to content

Commit d98a1cd

Browse files
committed
[SYCL] Omit extensions (.a .o .out .lib .obj .exe) in output project directory name
For "-o file.xxx" where the option value has an extension, if the extension is one of .a .o .out .lib .obj .exe, the output project directory name will be file.proj which omits the extension. Otherwise the output project directory name will be file.xxx.prj which keeps the original extension. Signed-off-by: Qichao Gu <[email protected]>
1 parent b98bb06 commit d98a1cd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

clang/lib/Driver/ToolChains/SYCL.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,11 @@ void SYCL::fpga::BackendCompiler::ConstructJob(
517517
if (Arg *FinalOutput = Args.getLastArg(options::OPT_o, options::OPT__SLASH_o,
518518
options::OPT__SLASH_Fe)) {
519519
SmallString<128> FN(FinalOutput->getValue());
520+
// For "-o file.xxx" where the option value has an extension, if the
521+
// extension is one of .a .o .out .lib .obj .exe, the output project
522+
// directory name will be file.proj which omits the extension. Otherwise
523+
// the output project directory name will be file.xxx.prj which keeps
524+
// the original extension.
520525
StringRef Ext = llvm::sys::path::extension(FN);
521526
SmallVector<StringRef, 6> Exts = {".o", ".a", ".out",
522527
".obj", ".lib", ".exe"};

0 commit comments

Comments
 (0)