[clang] [llvm] Reland - [Driver][SYCL] Add initial SYCL offload compilation support … (PR #117268)
Michael Toguchi via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 9 15:03:14 PST 2024
================
@@ -0,0 +1,179 @@
+//===--- SYCL.cpp - SYCL Tool and ToolChain Implementations -----*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+#include "SYCL.h"
+#include "CommonArgs.h"
+#include "llvm/Support/Path.h"
+
+using namespace clang::driver;
+using namespace clang::driver::toolchains;
+using namespace clang::driver::tools;
+using namespace clang;
+using namespace llvm::opt;
+
+SYCLInstallationDetector::SYCLInstallationDetector(
+ const Driver &D, const llvm::Triple &HostTriple,
+ const llvm::opt::ArgList &Args)
+ : D(D) {}
+
+void SYCLInstallationDetector::AddSYCLIncludeArgs(
+ const ArgList &DriverArgs, ArgStringList &CC1Args) const {
+ if (DriverArgs.hasArg(clang::driver::options::OPT_nobuiltininc))
+ return;
+
+ // Add the SYCL header search locations in the specified order.
+ // ../include/sycl/stl_wrappers
+ // ../include
+ SmallString<128> IncludePath(D.Dir);
+ llvm::sys::path::append(IncludePath, "..");
+ llvm::sys::path::append(IncludePath, "include");
----------------
mdtoguchi wrote:
Updates made to remove the header inclusions - `FIXME` in it's place until this is resolved with the library folks.
https://github.com/llvm/llvm-project/pull/117268
More information about the llvm-commits
mailing list