Skip to content

Commit 268c4b4

Browse files
Debug
1 parent 49255bb commit 268c4b4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

sycl-jit/jit-compiler/lib/rtc/DeviceCompilation.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
#include <array>
5353
#include <sstream>
5454

55+
#include <iostream>
56+
5557
using namespace clang;
5658
using namespace clang::tooling;
5759
using namespace clang::driver;
@@ -201,6 +203,10 @@ class SYCLToolchain {
201203
FileManager *Files,
202204
std::shared_ptr<PCHContainerOperations> PCHContainerOps,
203205
DiagnosticConsumer *DiagConsumer) override {
206+
for (auto &arg : Invocation->getCC1CommandLine())
207+
std::cout << " " << arg;
208+
std::cout << std::endl;
209+
204210
// Create a compiler instance to handle the actual work.
205211
CompilerInstance Compiler(std::move(Invocation),
206212
std::move(PCHContainerOps));
@@ -314,6 +320,11 @@ createCommandLine(const InputArgList &UserArgList, BinaryFormat Format,
314320
DerivedArgList DAL{UserArgList};
315321
const auto &OptTable = getDriverOptTable();
316322
DAL.AddFlagArg(nullptr, OptTable.getOption(OPT_fsycl_device_only));
323+
// TODO: Is this needed?
324+
DAL.AddJoinedArg(nullptr, OptTable.getOption(OPT_resource_dir_EQ),
325+
(jit_compiler::ToolchainPrefix + "/lib/clang/" +
326+
Twine(CLANG_VERSION_MAJOR))
327+
.str());
317328
// User args may contain options not intended for the frontend, but we can't
318329
// claim them here to tell the driver they're used later. Hence, suppress the
319330
// unused argument warning.

0 commit comments

Comments
 (0)