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

Move linking flags to build.rs to help with non-cargo build systems #287

Merged
merged 5 commits into from
Oct 24, 2023

Conversation

gferon
Copy link
Contributor

@gferon gferon commented Oct 23, 2023

While using rust_icu with Bazel, I realized that the #[cfg_attr] attributes in the code make everything difficult.

This brings the following improvement:

  • Makes it easier to add combination of features to change the flags, since we can use proper branching
  • Moving the instructions to the build.rs enables building rust_icu with Bazel (which can skip using the build.rs file)
  • Adds the ability to specify the RUST_ICU_LINK_SEARCH_DIR environment variable when you need to use a non-installed build of icu4c
  • Document the static feature and add a CI job to test this for both Ubuntu and macOS

@filmil
Copy link
Member

filmil commented Oct 24, 2023

Please rebase, and let me know when to continue reviewing.

@filmil filmil self-requested a review October 24, 2023 05:23
@gferon gferon force-pushed the link-buildrs branch 2 times, most recently from 84dd770 to f6f7b83 Compare October 24, 2023 09:15
@gferon
Copy link
Contributor Author

gferon commented Oct 24, 2023

This is ready for a review now!

@filmil
Copy link
Member

filmil commented Oct 24, 2023

Thank you for the contribution, for improving the linking recipes, and for the new workflow configuration!

All are most welcome.

@filmil filmil merged commit c6dac10 into google:main Oct 24, 2023
15 checks passed
@gferon gferon deleted the link-buildrs branch October 25, 2023 13:40
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.

2 participants