|
52 | 52 | #include <array> |
53 | 53 | #include <sstream> |
54 | 54 |
|
| 55 | +#include <iostream> |
| 56 | + |
55 | 57 | using namespace clang; |
56 | 58 | using namespace clang::tooling; |
57 | 59 | using namespace clang::driver; |
@@ -201,6 +203,10 @@ class SYCLToolchain { |
201 | 203 | FileManager *Files, |
202 | 204 | std::shared_ptr<PCHContainerOperations> PCHContainerOps, |
203 | 205 | DiagnosticConsumer *DiagConsumer) override { |
| 206 | + for (auto &arg : Invocation->getCC1CommandLine()) |
| 207 | + std::cout << " " << arg; |
| 208 | + std::cout << std::endl; |
| 209 | + |
204 | 210 | // Create a compiler instance to handle the actual work. |
205 | 211 | CompilerInstance Compiler(std::move(Invocation), |
206 | 212 | std::move(PCHContainerOps)); |
@@ -314,6 +320,11 @@ createCommandLine(const InputArgList &UserArgList, BinaryFormat Format, |
314 | 320 | DerivedArgList DAL{UserArgList}; |
315 | 321 | const auto &OptTable = getDriverOptTable(); |
316 | 322 | 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()); |
317 | 328 | // User args may contain options not intended for the frontend, but we can't |
318 | 329 | // claim them here to tell the driver they're used later. Hence, suppress the |
319 | 330 | // unused argument warning. |
|
0 commit comments