Skip to content

Use another variable to pass CFLAGS/CPPFLAGS to user OCaml code#12975

Closed
purplearmadillo77 wants to merge 1 commit intoocaml:trunkfrom
purplearmadillo77:passflags
Closed

Use another variable to pass CFLAGS/CPPFLAGS to user OCaml code#12975
purplearmadillo77 wants to merge 1 commit intoocaml:trunkfrom
purplearmadillo77:passflags

Conversation

@purplearmadillo77
Copy link
Copy Markdown
Contributor

I took a stab at not passing CFLAGS into all user compiled code (#12578, #12589) while keeping most of the current mechanism intact in new environment variables PASS_THRU_CFLAGS and PASS_THRU_CPPFLAGS.

This allows one to call ./configure PASS_THRU_CFLAGS=-Duseful_macro and pass those flags onto user commands such as ocamlc hello.c.

I wasn't sure what linker flag features were desired so I left those alone for now.

Instead, can pass flags at configure time through PASS_THRU_CFLAGS
and PASS_THRU_CPPFLAGS
@shindere
Copy link
Copy Markdown
Contributor

Many thanks for your proposal!

I believe that the original issue is addressed in a more principled way by
the new version of #12589.

@purplearmadillo77
Copy link
Copy Markdown
Contributor Author

Thank you! Will give it a try - response in #12589.

@dra27
Copy link
Copy Markdown
Member

dra27 commented Jul 16, 2024

#12589 has been merged in favour of this approach - thanks for the report, testing on the other PR and for this alternate approach!

@dra27 dra27 closed this Jul 16, 2024
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