Skip to content

[SYCL] Split build options into separate compile and link options #1087

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

Merged
merged 1 commit into from
Feb 4, 2020

Conversation

asavonic
Copy link
Contributor

@asavonic asavonic commented Feb 3, 2020

Only the options described in s5.8.5 "Linker Options" of OpenCL 2.0
specification are supported by clLinkProgram. Since
SYCL_PROGRAM_BUILD_OPTIONS environment variable and
`pi_device_binary_struct.BuildOptions' may contain compile
options (such as "-g"), we should not use it.

Same applies for clCompileProgram and link options.

This patch changes clang-offload-wrapper and SYCL runtime to maintain
two distinct lists of options: one for compile (to use with
clCompileProgram), and one for link (to use with clLinkProgram).

It also replaces SYCL_PROGRAM_BUILD_OPTIONS environment variable with
two separate variables: SYCL_PROGRAM_COMPILE_OPTIONS and
SYCL_PROGRAM_LINK_OPTIONS.

Signed-off-by: Andrew Savonichev [email protected]

Only the options described in s5.8.5 "Linker Options" of OpenCL 2.0
specification are supported by clLinkProgram. Since
SYCL_PROGRAM_BUILD_OPTIONS environment variable and
`pi_device_binary_struct.BuildOptions' may contain compile
options (such as "-g"), we should not use it.

Same applies for clCompileProgram and *link* options.

This patch changes clang-offload-wrapper and SYCL runtime to maintain
two distinct lists of options: one for compile (to use with
clCompileProgram), and one for link (to use with clLinkProgram).

It also replaces SYCL_PROGRAM_BUILD_OPTIONS environment variable with
two separate variables: SYCL_PROGRAM_COMPILE_OPTIONS and
SYCL_PROGRAM_LINK_OPTIONS.

Signed-off-by: Andrew Savonichev <[email protected]>
@romanovvlad romanovvlad merged commit 47a9411 into intel:sycl Feb 4, 2020
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