Repository navigation
Conversation
| # TODO we don't actually have a clang config | ||
| # just use GNU config | ||
| set(_OMR_TOOLCONFIG "gnu") | ||
| elseif(CMAKE_C_COMPILER_ID MATCHES "^Clang$") |
There was a problem hiding this comment.
Z system will use OpenXL compiler too. Have you make sure either of the two below?
- Z system will not use Clang compiler ID for that expected switch; or
- this config setting is applicable to them as well.
There was a problem hiding this comment.
Yes, I believe the COMPILER_ID on Z will be IBMClang and TOOLCONFIG will be set to openxl. I would like @Deigue to confirm this.
There was a problem hiding this comment.
I didn't consider that the COMPILER_ID can be different for Z system.
There was a problem hiding this comment.
you had better get together with @Deigue
either, both can use the same ID, if we can;
or, AIX uses a more differentiating and meaningful ID, rather than this very generic "Clang"
There was a problem hiding this comment.
I can't find any existing toolconfig for "openxl" that's why I used "gnu" for now.
There was a problem hiding this comment.
I've made the compiler id related changes here: #7319 ,
also will be moving the "IBMClang$" somewhere alongside the xlc clause so that all that compiler id variations can navigate to openxl toolchain easily from one spot based on Keiths feedback.
From what I remember, I was seeing zOS as the compiler ID while running locally, but when trying a Open XL build on Jenkins for z/OS, I was seeing the compiler id come out as "IBMClang" ...
In any case, I did create my own openxl.cmake toolconfig in the PR above.
There was a problem hiding this comment.
@Deigue Can this openxl.cmake be used for AIX as well?
There was a problem hiding this comment.
I would say yes, because there is a section in the file I left behind that says
if(OMR_OS_AIX) , that leaves the default state of setup/configs, I suspect from xlc.cmake .
So you would be able to use that section, but you may need to adapt the AIX configs to be whatever you need to make things work.
| # OpenXL17 uses CMAKE_C_COMPILER_ID "Clang" | ||
| set(_OMR_TOOLCONFIG "gnu") | ||
| set(CMAKE_C_COMPILER_IS_OPENXL TRUE CACHE BOOL "OpenXL is the C compiler") |
There was a problem hiding this comment.
Lines should be indented with tabs (like the rest of this file).
| int8_t *name = local_buffer; | ||
| bool isAddr = false; | ||
| intptr_t myTag; | ||
| intptr_t myTag=0; |
There was a problem hiding this comment.
Please add a space both sides of = (like the lines above).
This macro will specify if openXL17 clang is used. Signed-off-by: Ishita Ray <ishita.ray@ibm.com>
b133569 to
4fee25b
Compare
| int8_t *name = local_buffer; | ||
| bool isAddr = false; | ||
| intptr_t myTag; | ||
| intptr_t myTag = 0; |
There was a problem hiding this comment.
This change seems unrelated to the title of this pull request; perhaps it should be proposed separately?
There was a problem hiding this comment.
It is a good change: It just should just be independent of build configurations.
There was a problem hiding this comment.
Yes. We need this change. We will add this change through another PR.
| if(CMAKE_C_COMPILER_IS_OPENXL) | ||
| set(OMR_ENV_OPENXL 1) | ||
| set(ENV{OMR_ENV_OPENXL} ${OMR_ENV_OPENXL}) | ||
| else() | ||
| set(OMR_ENV_OPENXL 0) | ||
| set(ENV{OMR_ENV_OPENXL} ${OMR_ENV_OPENXL}) | ||
| endif() |
There was a problem hiding this comment.
Why would we want this? Won't CMAKE_C_COMPILER_IS_OPENXL be sufficient?
There was a problem hiding this comment.
That environment variable is for Makefiles to check if the compiler is openxl. I used that env variable instead of adding openxl in defaults.yml
There was a problem hiding this comment.
Which makefiles? With cmake, we don't write makefiles (cmake might even use another generator, e.g. ninja).
I don't see any references to OMR_ENV_OPENXL, neither in cmakefiles nor the environment; perhaps it would help if you provided a sample of how you imagine they would be used.
There was a problem hiding this comment.
Following is an example where the environment variable is used in openj9/runtime/makelib/targets.mk.aix.inc.ftl
ifeq ($(OMR_ENV_OPENXL),1)
# openxl options
CXXFLAGS += -std=c++11 -qarch=ppc -fno-strict-aliasing -fstack-protector
else
CXXFLAGS += -qlanglvl=extended0x -qarch=ppc -qalias=noansi -qxflag=LTOL:LTOL0 -qsuppress=1506-1108 -qstackprotect
endif
More use of this env variable can be found in this PR eclipse-openj9/openj9#20045
There was a problem hiding this comment.
Those makefiles are not used when cmake is being used.
There was a problem hiding this comment.
Yes. I used this CMAKE variable to let the makefiles know that the compiler is openxl. The other way of doing it may be by setting the compiler in defaults.yml
There was a problem hiding this comment.
My point is that when using cmake, files like openj9/runtime/gc_glue_java/configure_includes/configure_aix_ppc.mk are not used, so the reference there (in eclipse-openj9/openj9#20045) is not helpful.
There was a problem hiding this comment.
these PRs were intended to make changes which allows builds by all available (and being used) compilers (i.e. xlC/xlclang/OpenXL), through either cmake or UMA. so, we need to keep these changes anyway.
There was a problem hiding this comment.
Yes, we would like UMA builds to be possible with OpenXL (although I consider that a bonus, not a necessity), but setting an environment variable for cmake can't benefit UMA builds, so the question remains: why is the variable being set (in cmake)?
4fee25b to
002c25e
Compare
|
i remembered she had 3 PRs (2 OMR and 1 OpenJ9). @midronij have you squashed that 2 OMR into your single one? also, you might need a separate one to init |
|
Closing as requested. |
and eclipse-omr#7480 Signed-off-by: midronij <jackie.midroni@ibm.com>
Added macro CMAKE_C_COMPILER_IS_OPENXL that will be used to add compiler options for openXL