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

Improve warning message when ignore fake shared libraries. NFC #23594

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Feb 5, 2025

Also, add a test for this warning which was previously not tested.

@sbc100 sbc100 requested review from kripken and dschuff February 5, 2025 17:19
Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

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

lgtm % comment

tools/link.py Outdated
@@ -2894,7 +2894,7 @@ def filter_out_fake_dynamic_libs(options, inputs):
def is_fake_dylib(input_file):
if get_file_suffix(input_file) in DYLIB_EXTENSIONS and os.path.exists(input_file) and not building.is_wasm_dylib(input_file):
if not options.ignore_dynamic_linking:
diagnostics.warning('emcc', 'ignoring dynamic library %s because not compiling to JS or HTML, remember to link it when compiling to JS or HTML at the end', os.path.basename(input_file))
diagnostics.warning('emcc', 'ignoring dynamic library %s when generating an object file, this will need to be included in the final link', os.path.basename(input_file))
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
diagnostics.warning('emcc', 'ignoring dynamic library %s when generating an object file, this will need to be included in the final link', os.path.basename(input_file))
diagnostics.warning('emcc', 'ignoring dynamic library %s when generating an object file, this will need to be manually included in the final link', os.path.basename(input_file))

I think "remember to" was saying this must be done explicitly and manually. Seems good to keep that, as otherwise "this will need to be included" might sound like "the linker will do it".

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I went with "included explictily"

Also, add a test for this warning which was previously not tested.
@sbc100 sbc100 enabled auto-merge (squash) February 5, 2025 17:54
@sbc100 sbc100 merged commit 3a8cb2a into emscripten-core:main Feb 5, 2025
29 checks passed
@sbc100 sbc100 deleted the object_warning branch February 5, 2025 19:04
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.

2 participants