Skip to content

Respect symbol visibility in export calculation#2821

Merged
hoodmane merged 13 commits intopyodide:mainfrom
hoodmane:symbol-visibility
Jul 4, 2022
Merged

Respect symbol visibility in export calculation#2821
hoodmane merged 13 commits intopyodide:mainfrom
hoodmane:symbol-visibility

Conversation

@hoodmane
Copy link
Copy Markdown
Member

@hoodmane hoodmane commented Jul 1, 2022

We shouldn't export symbols with __attribute__((visibility("hidden"))). Numpy has a test to check that symbols with this attribute aren't exported. This fixes that test.

@hoodmane hoodmane force-pushed the symbol-visibility branch from 65192cd to 1fa76e9 Compare July 2, 2022 13:52
@hoodmane
Copy link
Copy Markdown
Member Author

hoodmane commented Jul 2, 2022

@ryanking13 would you mind looking into the failures here? I don't understand how they are related to the changes and cannot reproduce them locally.

@hoodmane
Copy link
Copy Markdown
Member Author

hoodmane commented Jul 2, 2022

Nevermind, some debugging stuff broke it.

Copy link
Copy Markdown
Member

@ryanking13 ryanking13 left a comment

Choose a reason for hiding this comment

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

Thanks, @hoodmane. I have minor code suggestions otherwise LGTM.

hoodmane and others added 2 commits July 3, 2022 20:36
Co-authored-by: Gyeongjae Choi <def6488@gmail.com>
@hoodmane hoodmane force-pushed the symbol-visibility branch from e211ab9 to 255ff62 Compare July 4, 2022 05:36

result = []
insymbol = False
for line in completedprocess.stdout.split("\n"):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Mybe better to move this to a private helper function (that takes in str and returns the result) and additionally give it a few stdout examples in doctests. Would be easier to understand what kind of stdout output we are typically getting and what is done with it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This command has a json output format... but frustratingly it outputs not quite valid json. The errors are minor enough that it seemed like it might be possible to fix by find and replace after the fact but it wasn't worth it.

@hoodmane hoodmane merged commit 686426a into pyodide:main Jul 4, 2022
@hoodmane hoodmane deleted the symbol-visibility branch July 4, 2022 18:32
@hoodmane
Copy link
Copy Markdown
Member Author

hoodmane commented Jul 4, 2022

Thanks for the reviews @ryanking13 @rth!

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.

3 participants