mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 12:26:07 +00:00

SYCL compilations initiated by the driver will spawn off one or more frontend compilation jobs (one for device and one for host). This patch reworks the driver options to make upstreaming this from the downstream SYCL fork easier. This patch introduces a language option to identify host executions (SYCLIsHost) and a -cc1 frontend option to enable this mode. -fsycl and -fno-sycl become driver-only options that are rejected when passed to -cc1. This is because the frontend and beyond should be looking at whether the user is doing a device or host compilation specifically. Because the frontend should only ever be in one mode or the other, -fsycl-is-device and -fsycl-is-host are mutually exclusive options.
6 lines
301 B
C++
6 lines
301 B
C++
// RUN: %clang_cc1 %s -triple spir -aux-triple x86_64-unknown-linux-gnu -E -dM | FileCheck %s
|
|
// RUN: %clang_cc1 %s -fsycl-is-device -triple spir -aux-triple x86_64-unknown-linux-gnu -E -dM | FileCheck --check-prefix=CHECK-SYCL %s
|
|
|
|
// CHECK-NOT:#define __x86_64__ 1
|
|
// CHECK-SYCL:#define __x86_64__ 1
|