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

Reapply size optimizations for clang & MSVC, LTO for Mac+Linux #1685

Merged
merged 2 commits into from
Oct 25, 2023

Conversation

nicholasjng
Copy link
Contributor

Working towards cross-platform optimal nanobind building configurations.

Re: LTO:

The Windows case (the option name is "/GL") is more complicated, since there, the compiler options also need to be passed to the linker if LTO is enabled.

Since we are gating the linker options on platform at the moment instead of compiler, we need to implement a Bazel boolean flag for the case "Platform == MacOS && Compiler == AnyOf(gcc, clang)".

I also applied buildifier, which formats Bazel files (BUILD, WORKSPACE, .bzl) nicely - we could integrate this in CI if there's interest.

Working towards cross-platform optimal nanobind building configurations.
The Windows case (the option name is "/GL") is more complicated, since
there, the compiler options also need to be passed to the linker if LTO
is enabled.

Since we are gating the linker options on platform at the moment instead
of compiler, we need to implement a Bazel boolean flag for the case
"Platform == MacOS && Compiler == AnyOf(gcc, clang)".
@dmah42
Copy link
Member

dmah42 commented Oct 25, 2023

a buildifier linter would be great for CI.

@dmah42 dmah42 merged commit 698d1dc into google:main Oct 25, 2023
53 of 60 checks passed
@nicholasjng
Copy link
Contributor Author

Ha, Windows Python CI is green now post-merge, did you bet on that to work?

https://github.com/google/benchmark/actions/runs/6639541298

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.

None yet

2 participants