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

build: add new flag "--enable-optimizations" and expand scope of "--enable-debug", additional homekeeping #85

Merged
merged 20 commits into from
May 28, 2024

Conversation

kwvg
Copy link
Collaborator

@kwvg kwvg commented Jul 24, 2023

Additional information

This pull request is a result a comment which proposed a possible source for non-reproducible builds on Apple Silicon as difference in optimized code output.

While investigating further, it was realized that bls-signatures lacks the option to enable useful debugging flags or disable optimizations (both by the compiler and from libraries).

  • --enable-debug will set DEBUG=1 for Relic (existing behaviour), disables compiler optimization (and leaves library optimizations as-is), sets the dbginfo level to 3 and sets -ftrapv
  • --disable-optimizations will disable both compiler and library optimizations (by setting (CPU_)ARCH to none and setting the backend to easy unless overridden), does not change the dbginfo level and sets -fwrapv

If both flags are used and there are conflicts, the flags set by --enable-debug will take precedence (i.e. debug level will be 3 and -ftrapv will be set)

These changes are made alongside general housekeeping and consolidation of the autoconf script.

@kwvg kwvg force-pushed the debug branch 4 times, most recently from c097ee8 to d477da4 Compare July 24, 2023 14:28
@kwvg kwvg requested review from knst, UdjinM6 and PastaPastaPasta July 24, 2023 15:12
@github-actions
Copy link

'This PR has been flagged as stale due to no activity for over 60
days. It will not be automatically closed, but it has been given
a stale-pr label and should be manually reviewed.'

@kwvg kwvg removed the stale-pr label Sep 23, 2023
@kwvg kwvg marked this pull request as ready for review September 23, 2023 13:44
@UdjinM6
Copy link

UdjinM6 commented Feb 13, 2024

LGTM

These changes are made alongside general housekeeping

pls check 0d88e91 for more of this :)

kwvg and others added 13 commits April 20, 2024 16:12
…erm]`

The arguments were called `disable-{tests,bench,hardening}` but the
variable they set was `use_[term]`, which could lead to an inversion.

It appears that it is expected that developers declare enablement flags
and Autotools will generate their equivalent disablement flags but there's
no text to indicate that the same will happen vice-versa.
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
This is a problem introduced by skipping architecture specific flags
when building with optimizations disabled.

Neither i?86 nor arm contain the number 32 in it, making number based
matching unusable. But arm64 is 64-bit (though usually the recommended
term is aarch64) and so we must match targets with the number 64 first
before we assume anything with arm is 32-bit.
@kwvg kwvg force-pushed the debug branch 2 times, most recently from f6e6462 to 6a14049 Compare April 21, 2024 10:27
@kwvg kwvg changed the title build: add new flag "--enable-optimizations" and expand scope of "--enable-debug" build: add new flag "--enable-optimizations" and expand scope of "--enable-debug", additional homekeeping Apr 21, 2024
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, utACK 39791d4

(not sure why GH decided to put my approval here and not down below - I clearly pulled 39791d4 to review/compile 🤷‍♂️ )

kwvg and others added 4 commits April 21, 2024 11:37
Helps us avoid a situation where a compiler will report a warning instead
of erroring out when testing a flag, giving `autotools` the impression they
are supported when they are not, polluting the build log with "argument
unused during compilation" messages.
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Copy link

@knst knst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

light-utACK

@PastaPastaPasta PastaPastaPasta merged commit 69bdc1a into dashpay:develop May 28, 2024
27 checks passed
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.

4 participants