[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #117268)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 2 17:05:33 PST 2025
================
@@ -0,0 +1,154 @@
+//===--- 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.
+ // FIXME: Add the header file locations once the SYCL library and headers
+ // are properly established within the build.
+}
+
+// Unsupported options for SYCL device compilation.
+static std::vector<OptSpecifier> getUnsupportedOpts() {
----------------
MaskRay wrote:
return `ArrayRef`.
UnsupportedOpts below can be a plain array
https://github.com/llvm/llvm-project/pull/117268
More information about the llvm-commits
mailing list