Build system: use OC_CFLAGS and CFLAGS even during the link stage#9837
Merged
dra27 merged 1 commit intoocaml:trunkfrom Aug 11, 2020
Merged
Build system: use OC_CFLAGS and CFLAGS even during the link stage#9837dra27 merged 1 commit intoocaml:trunkfrom
dra27 merged 1 commit intoocaml:trunkfrom
Conversation
89d842a to
dc6637e
Compare
dra27
reviewed
Aug 10, 2020
dc6637e to
478127f
Compare
Contributor
Author
|
David Allsopp (2020/08/10 02:47 -0700):
I think it's worth a comment here that `$(OC_CFLAGS)` and `$(CFLAGS)`
don't get included on Windows because flexlink is called, rather than
the C compiler?
It's definitely a good idea, thanks. Done:
# In general this command is supposed to use the CFLAGs-related variables
# ($OC_CFLAGS and $CFLAGS), but at the moment they are not taken into
# account on Windows, because flexlink, which is used to build
# executables on this platform, can not handle them.
|
dra27
approved these changes
Aug 11, 2020
Contributor
Author
gasche
added a commit
to gasche/ocaml
that referenced
this pull request
Dec 18, 2020
OC_LDFLAGS is for options specific to linking OCaml programs, LDFLAGS are user-chosen flags that should be included in any call to the system linker. This is intended to fix ocaml#9191. The logic followed in this PR is similar to the treatment of CFLAGS in the build system, which comes from ocaml#9837. Passing LDFLAGS to flexlink is not supported. It is a pain to do correctly, and we haven't got requests from Windows users yet, only from users of unix variants.
gasche
added a commit
to gasche/ocaml
that referenced
this pull request
Dec 19, 2020
OC_LDFLAGS is for options specific to linking OCaml programs, LDFLAGS are user-chosen flags that should be included in any call to the system linker. This is intended to fix ocaml#9191. The logic followed in this PR is similar to the treatment of CFLAGS in the build system, which comes from ocaml#9837. Passing LDFLAGS to flexlink is not supported. It is a pain to do correctly, and we haven't got requests from Windows users yet, only from users of unix variants.
gasche
added a commit
to gasche/ocaml
that referenced
this pull request
Dec 21, 2020
OC_LDFLAGS is for options specific to linking OCaml programs, LDFLAGS are user-chosen flags that should be included in any call to the system linker. This is intended to fix ocaml#9191. The logic followed in this PR is similar to the treatment of CFLAGS in the build system, which comes from ocaml#9837. Passing LDFLAGS to flexlink is not supported. It is a pain to do correctly, and we haven't got requests from Windows users yet, only from users of unix variants.
gasche
added a commit
to gasche/ocaml
that referenced
this pull request
Dec 21, 2020
OC_LDFLAGS is for options specific to linking OCaml programs, LDFLAGS are user-chosen flags that should be included in any call to the system linker. This is intended to fix ocaml#9191. The logic followed in this PR is similar to the treatment of CFLAGS in the build system, which comes from ocaml#9837. Passing LDFLAGS to flexlink is not supported. It is a pain to do correctly, and we haven't got requests from Windows users yet, only from users of unix variants.
dbuenzli
pushed a commit
to dbuenzli/ocaml
that referenced
this pull request
Mar 25, 2021
OC_LDFLAGS is for options specific to linking OCaml programs, LDFLAGS are user-chosen flags that should be included in any call to the system linker. This is intended to fix ocaml#9191. The logic followed in this PR is similar to the treatment of CFLAGS in the build system, which comes from ocaml#9837. Passing LDFLAGS to flexlink is not supported. It is a pain to do correctly, and we haven't got requests from Windows users yet, only from users of unix variants.
mroch
pushed a commit
to mroch/ocaml
that referenced
this pull request
Aug 31, 2021
OC_LDFLAGS is for options specific to linking OCaml programs, LDFLAGS are user-chosen flags that should be included in any call to the system linker. This is intended to fix ocaml#9191. The logic followed in this PR is similar to the treatment of CFLAGS in the build system, which comes from ocaml#9837. Passing LDFLAGS to flexlink is not supported. It is a pain to do correctly, and we haven't got requests from Windows users yet, only from users of unix variants.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a follow-up to PR #9824.
Actually, the CFLAGS-related variables need to be passed to the C
compiler also during link-time (a flog like -g for instance).
This PR fixes this and thus makes Inria's extra-checks CI job work again
(it was broken because building with sanitizers was failing).