On Ubuntu, we want to raise default CLANG_SYSTEMZ_ARCH to z13, thus allow configuring this via CMake.
On Debian, we want to raise it to z196.
Details
- Reviewers
uweigand - Group Reviewers
Restricted Project Restricted Project - Commits
- rG9c9d88d8b1bb: [SystemZ] Allow configuring default CLANG_SYSTEMZ_ARCH
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks for working on this! A few comments inline.
CMakeLists.txt | ||
---|---|---|
311 | Should be moved above the set(CLANG_VENDOR, ... line. Also, this new variable itself have a set line, so that we can provide a descriptive text, and also move the "z10" default to here instead of the sources. Finally, I think the mixed-case name doesn't really match the common naming conventions here, what about CLANG_SYSTEMZ_DEFAULT_ARCH ? |
This doesn't apply cleanly to current mainline. Can you rebase and test again? I'll check it in then.
Rebased I think. If it helps here is the github pull-request too https://github.com/llvm/llvm-project/pull/196
Git format patch https://github.com/xnox/llvm-project/commit/a6122cd8dc1b10bcba751f851cf5b1751cff165c.patch
Or $ git pull https://github.com/xnox/llvm-project D75914
clang/CMakeLists.txt | ||
---|---|---|
311 ↗ | (On Diff #253559) | Passing values like this is unusual for CMake and causes all source files to be recompiled if the value is changed. Instead could we add this to include/clang/Config/config.h.cmake like other CLANG_DEFAULT_* options? |
Ah, good point. Dimitry, can you prepare an updated patch to implement Jonas' suggestion?
clang/CMakeLists.txt | ||
---|---|---|
311 ↗ | (On Diff #253559) | +1 |
clang/CMakeLists.txt | ||
---|---|---|
311 ↗ | (On Diff #253559) | Also, this is used in one cpp file; passing the define to every compilation unit seems a bit aggressive. I'll try to land a patch to fix this. |
clang/CMakeLists.txt | ||
---|---|---|
311 ↗ | (On Diff #253559) | Done in c506adcdf2ca3ba6459e52e09c55868e3b57af46. (This only changes the implementation of the feature; the way people who build clang tell cmake what they want didn't change.) |
Sorry for being too slow =) I like all the fixes done to move the define into a more natural config.h location, thank you.
Should be moved above the set(CLANG_VENDOR, ... line.
Also, this new variable itself have a set line, so that we can provide a descriptive text, and also move the "z10" default to here instead of the sources.
Finally, I think the mixed-case name doesn't really match the common naming conventions here, what about CLANG_SYSTEMZ_DEFAULT_ARCH ?