This mostly keeps the same warning flags. The most important exceptions are -Wpedantic and -Wconversion, which are now removed from libc++abi and libunwind.
Details
- Reviewers
ldionne - Group Reviewers
Restricted Project Restricted Project Restricted Project - Commits
- rGa7aade1f36eb: [runtimes] Synchronize warnings flags between libc++/libc++abi/libunwind
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
runtimes/cmake/Modules/WarningFlags.cmake uses target_add_compile_flags_if_supported which is defined in https://github.com/llvm/llvm-project/blob/2b2b8409e6848361577be404bd0ae47a097f0e0c/libcxx/cmake/Modules/HandleLibcxxFlags.cmake#L246. That function uses other functions defined in the same file. That file is also not explicitly included here.
I'd prefer to first move https://github.com/llvm/llvm-project/blob/2b2b8409e6848361577be404bd0ae47a097f0e0c/libcxx/cmake/Modules/HandleLibcxxFlags.cmake to runtimes/cmake/Modules and replace https://github.com/llvm/llvm-project/blob/2b2b8409e6848361577be404bd0ae47a097f0e0c/libcxxabi/cmake/Modules/HandleLibcxxabiFlags.cmake and https://github.com/llvm/llvm-project/blob/2b2b8409e6848361577be404bd0ae47a097f0e0c/libunwind/cmake/Modules/HandleLibunwindFlags.cmake.
Can you record in the commit message what the changes to the warnings are? It seems like the libcxxabi and libunwind warning flags were the same, so those are synced to the libcxx warnings. However, that synchronization removes -Wconversion from the libcxxabi and libunwind flags (the TODO you added). Is that all?
Thanks for the refactoring by the way, this is a great way to get where we needed to be while leaving the code better behind you.
libcxx/CMakeLists.txt | ||
---|---|---|
844 | Here you use cxx_add_warning_flags but you have not included WarningFlags.cmake. I think that's your Windows CI issue. IDK why it works on other platforms, that's almost concerning. | |
runtimes/cmake/Modules/WarningFlags.cmake | ||
70–73 | FWIW I strongly suspect this is not needed anymore. Let's try to get rid of it in a different patch. |
Here you use cxx_add_warning_flags but you have not included WarningFlags.cmake. I think that's your Windows CI issue. IDK why it works on other platforms, that's almost concerning.