Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[src] Use JL_CFLAGS and JL_CXXFLAGS variables to build Julia #44867

Merged
merged 2 commits into from
Apr 7, 2022

Conversation

giordano
Copy link
Contributor

@giordano giordano commented Apr 5, 2022

These variables are always used, they don't mess up with JCFLAGS and
JCXXFLAGS and are specific to building Julia's source code only (not the
dependencies).

The use case is to be able to set compiler flags to be used only when compiling Julia, without affecting the dependencies. See JuliaCI/julia-buildkite#86. A similar strategy is used in OpenLibm

These variables are always used, they don't mess up with `JCFLAGS` and
`JCXXFLAGS` and are specific to building Julia's source code only (not the
dependencies).
@giordano giordano requested a review from staticfloat April 5, 2022 19:52
Copy link
Member

@staticfloat staticfloat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me; useful for injecting things like -Werror without obliterating default compiler flags.

@vtjnash
Copy link
Member

vtjnash commented Apr 5, 2022

In openlibm, _add is the internal name. Shall we make something like JL_CFLAGS the exported name? That would match roughly with systems such as AM_CFLAGS. Or make the internal name CFLAGS_libjulia (which would match kbuild)?

@staticfloat
Copy link
Member

JL_CFLAGS would be fine to me.

@giordano giordano changed the title [src] Use JCFLAGS_add and JCXXFLAGS_add variables to build Julia [src] Use JL_CFLAGS and JL_CXXFLAGS variables to build Julia Apr 5, 2022
@staticfloat staticfloat merged commit ad047d0 into JuliaLang:master Apr 7, 2022
@giordano giordano deleted the mg/jcflags-add branch April 7, 2022 06:37
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.

3 participants