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

curl-compilers.m4: use -O2 as default optimize for clang #9444

wants to merge 1 commit into from


Copy link

@bagder bagder commented Sep 6, 2022

Not -Os

@bagder bagder added the build label Sep 6, 2022
@bagder bagder closed this in 51083a1 Sep 6, 2022
@bagder bagder deleted the bagder/clang-opt-level branch September 6, 2022 16:48
vszakats added a commit to curl/curl-for-win that referenced this pull request Sep 25, 2022
Turns out the reason for autotools forcing its own -On option was that we
explicitly asked for it via the `--enable-optimize` ./configure option.
(The default option is `-Os`, which Daniel fixed [1][2] to be `-O2`,
upcoming in the next curl release.)

Delete `--enable-optimize` in this patch and pass `-O3` via `CFLAGS` for
one notch higher level of optimization than the default. CMake uses `-O3`
by default and we want this to be the same for all three build systems to
emit the same binaries.

With this, we are down to one local patch.

[1] curl/curl@51083a1
[2] curl/curl#9444
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Successfully merging this pull request may close these issues.

None yet

1 participant