Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Driver][SYCL] Allow for -fcf-protection to run on host only #7251

Merged
merged 1 commit into from
Nov 1, 2022

Conversation

mdtoguchi
Copy link
Contributor

The -fcf-protection option is not supported for spir64 targets. This causes an error during device compilation when compiled with -fsycl. Allow the option to be accepted and work on the host compilation side only, emitting a diagnostic that the option is being ignored for the target compiles.

before: clang++ -fsycl -fcf-protection -c a.cpp
error: option 'cf-protection=return' cannot be specified on this target error: option 'cf-protection=branch' cannot be specified on this target 2 errors generated.

after: clang++ -fsycl -fcf-protection -c a.cpp
clang-16: warning: ignoring '-fcf-protection' option as it is not currently supported for target 'spir64-unknown-unknown' [-Woption-ignored]

The -fcf-protection option is not supported for spir64 targets.  This causes
an error during device compilation when compiled with -fsycl.  Allow the
option to be accepted and work on the host compilation side only, emitting
a diagnostic that the option is being ignored for the target compiles.

before: clang++ -fsycl -fcf-protection -c a.cpp
error: option 'cf-protection=return' cannot be specified on this target
error: option 'cf-protection=branch' cannot be specified on this target
2 errors generated.

after: clang++ -fsycl -fcf-protection -c a.cpp
clang-16: warning: ignoring '-fcf-protection' option as it is not currently supported for target 'spir64-unknown-unknown' [-Woption-ignored]
@mdtoguchi mdtoguchi requested a review from a team as a code owner November 1, 2022 21:41
@pvchupin pvchupin merged commit b6f61f6 into intel:sycl Nov 1, 2022
@mdtoguchi mdtoguchi deleted the fcf-protection-host-only branch November 2, 2022 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants