Skip to content

[CI] Add -Wconversion flag when building compiler in CI #18788

Open
@uditagarwal97

Description

@uditagarwal97
Contributor

Describe the bug

For context: #18786

To reproduce

Environment

Additional context

No response

Activity

self-assigned this
on Jun 3, 2025
AlexeySachkov

AlexeySachkov commented on Jun 3, 2025

@AlexeySachkov
Contributor

We kind of have it already in

add_compile_option_ext("-Wconversion" WCONVERSION)

However, that applies it globally and we can't realistically expect LLVM to build with this flag. Therefore, as part of this task, I suggest that we drop -Wconversion from AddSecurityFlags.cmake and apply it to specific sub-projects that we own ourselves.

KornevNikita

KornevNikita commented on Jun 3, 2025

@KornevNikita
Contributor

@uditagarwal97 I guess it's easy to find the right place, but just in case it probably should be here - https://github.com/intel/llvm/blob/sycl/sycl/CMakeLists.txt#L107

Also, it would be nice to have "-Wimplicit-fallthrough" for release builds, this flag is also a part of requirements (but only for the release type).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @AlexeySachkov@uditagarwal97@KornevNikita

      Issue actions

        [CI] Add `-Wconversion` flag when building compiler in CI · Issue #18788 · intel/llvm