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

Making target_compile_options PRIVATE, fix #2726, fix #2507 #2728

Merged
merged 1 commit into from
Jan 23, 2022

Conversation

VasiliPupkin256
Copy link
Contributor

I weren't able to reach @ambitslix in the issue #1684 so I am not sure what exactly caused the problem for him. I think that making compile options private is a good compromise. It is always easier to add an option to the project using the library than removing an option set by an included library and unconditionally propagated to the whole project using it. This should close #2726 and also solve an already closed #2507. Probably this target_compile_options can be removed completely, I don't think there was an issue building the library itself, but I don't have an environment to reproduce the error that this line solved on the first place.

Copy link
Contributor

@vitaut vitaut left a comment

Choose a reason for hiding this comment

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

Thanks for the PR.

Comment on lines 253 to 255
if (${FMT_HAS_MBIG_OBJ})
target_compile_options(fmt PUBLIC "-Wa,-mbig-obj")
target_compile_options(fmt PRIVATE "-Wa,-mbig-obj")
endif()
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest removing this block altogether because this is some old workaround that may not even be applicable any more. We can always reintroduce the workaround as an opt-in if it happens again.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The issue #1684 is less than 2 years old...

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, but it's unclear what purpose -Wa,-mbig-obj serves here. The library itself is very small and unlikely to cause linker issues so it might be solving a problem elsewhere.

Copy link
Contributor

Choose a reason for hiding this comment

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

BTW this option was added in #1716. Maybe @ambitslix can shed light why it was needed.

@vitaut vitaut merged commit dfcc730 into fmtlib:master Jan 23, 2022
@vitaut
Copy link
Contributor

vitaut commented Jan 23, 2022

Anyway, let's merge this as an immediate fix for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants