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

Selecting library_flags based on OS type #2718

Closed
anton-trunov opened this issue Oct 8, 2019 · 4 comments
Closed

Selecting library_flags based on OS type #2718

anton-trunov opened this issue Oct 8, 2019 · 4 comments

Comments

@anton-trunov
Copy link

Is there an easy way to set library_flags when building on macOS but not doing that otherwise?
E.g. I'd like to express something like this

(library_flags
 (if (= %{os_type} macosx)
  (-cclib -Wl,-keep_dwarf_unwind)))

Thank you in advance.

@nojb
Copy link
Collaborator

nojb commented Oct 8, 2019

You should be able to use (:include <filename>) (where <filename> can be generated by another rule), see https://jbuilder.readthedocs.io/en/latest/concepts.html#id2

@ghost
Copy link

ghost commented Oct 9, 2019

We should probably add the (if ...) form though. Included files are a bit heavy for such cases

@anton-trunov
Copy link
Author

Yes, please! I noticed that Dune has boolean constructors, but not boolean eliminators (at least not general ones).

@emillon
Copy link
Collaborator

emillon commented Mar 16, 2023

To summarize this issue, "selecting library_flags based on OS type" is possible through :include. The (if) form is a separate issue, #924. So I'm closing this. Thanks!

@emillon emillon closed this as completed Mar 16, 2023
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

No branches or pull requests

3 participants