Skip to content

Unify default behavior for --warn-mismatch flags#1308

Merged
Steven Ramirez Rosa (Steven6798) merged 1 commit into
qualcomm:mainfrom
Steven6798:issue-1293
Jun 26, 2026
Merged

Unify default behavior for --warn-mismatch flags#1308
Steven Ramirez Rosa (Steven6798) merged 1 commit into
qualcomm:mainfrom
Steven6798:issue-1293

Conversation

@Steven6798

Copy link
Copy Markdown
Contributor

Remove architecture-specific initialization of --[no-]warn-mismatch when not explicitly provided. Set the default behavior consistently to --warn-mismatch across all architectures.

Fix: #1293

@quic-areg quic-areg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you add a test? IIRC before this patch we would allow 32-bit and 64-bit objects to be merged without a warning on RISC-V and ARM, and that should no longer be the case.

LGTM otherwise

Comment thread include/eld/Config/GeneralOptions.h Outdated
Comment thread lib/Target/AArch64/AArch64Info.h Outdated

@quic-areg quic-areg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Test missing?

@Steven6798

Copy link
Copy Markdown
Contributor Author

Test missing?

Sorry I completely missed your first comment. I'll update the patch

Remove architecture-specific initialization of --[no-]warn-mismatch when
not explicitly provided. Set the default behavior consistently to
--warn-mismatch across all architectures.

Fix: qualcomm#1293

Signed-off-by: Steven Ramirez Rosa <ramirezr@qti.qualcomm.com>
@Steven6798

Copy link
Copy Markdown
Contributor Author

Can you add a test? IIRC before this patch we would allow 32-bit and 64-bit objects to be merged without a warning on RISC-V and ARM, and that should no longer be the case.

I updated the WrongArchInput test to include test cases without the --wan-mismatch flag. This should be enough to test the default behavior. Thanks for catching this.

@Steven6798 Steven Ramirez Rosa (Steven6798) merged commit 51c8dcf into qualcomm:main Jun 26, 2026
13 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.

Default to --warn-mismatch when --[no-]warn-mismatch flags are not present

4 participants