[Driver][SYCL] Compile source file for integration header generation #20818
+21
−9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When compiler for preprocessing only, the preprocessing step that occurs does not generate the integration header/footer information that is used during the host compilation step. To generate the integration information in this case, the driver inserts an additional compilation step that creates the files to be consumed at the host step.
The compilation step to produce the integration information is using the generated preprocessed file. For cases where there are build warnings that are emitted during this step, use of -Werror will cause the compilation to fail. These diagnostics are typically suppressed when not performing preprocess only compilations, but due to the fact that the build step against the preprocessed file does not know to suppress the diagnostics from system headers, compilation behaviors are at a disconnect.
To fix this, the behavior when creating a preprocessed file (i.e. when we are using -E and stopping compilation), the driver will now compile the original source file instead of the preprocessed file.