Skip to content

Conversation

@npmiller
Copy link
Contributor

CFLAGS is a make environment variable so its contents were not used
by the lit tests which call clang directly.

Adding them to the additional_flags of use_clang, adds them to the
%clangxx substitutions and ensures they are passed around everywhere.

In addition these extra flags were only set on Linux because they were
used for Linux C++ library assertions, but now they will be set on both
Linux and Windows, however the Linux C++ library assertions defines will
only be set on Linux.

This also allows users to add custom clang parameters to the lit tests
through the SYCL_CLANG_EXTRA_FLAGS CMake parameter. Which will be a
requirement for the ROCm AMD lit tests as for AMD the target needs to be
specified with -mcpu.

`CFLAGS` is a `make` environment variable so its contents were not used
by the lit tests which call `clang` directly.

Adding them to the `additional_flags` of `use_clang`, adds them to the
`%clangxx` substitutions and ensures they are passed around everywhere.

In addition these extra flags were only set on Linux because they were
used for Linux C++ library assertions, but now they will be set on both
Linux and Windows, however the Linux C++ library assertions defines will
only be set on Linux.

This also allows users to add custom clang parameters to the lit tests
through the `SYCL_CLANG_EXTRA_FLAGS` CMake parameter. Which will be a
requirement for the ROCm AMD lit tests as for AMD the target needs to be
specified with `-mcpu`.
@npmiller npmiller requested a review from a team as a code owner July 15, 2021 10:05
@npmiller npmiller requested a review from sergey-semenov July 15, 2021 10:05
@AlexeySachkov
Copy link
Contributor

@erichkeane: FYI, SYCL_CLANG_EXTRA_FLAGS should be useful for you

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.

4 participants