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

Simplify .gn to reduce size of static lib #315

Merged
merged 6 commits into from
Mar 21, 2020
Merged

Conversation

ry
Copy link
Member

@ry ry commented Mar 16, 2020

We noticed that the static lib binaries were quite large. 176mb for mac/debug.

We aren't sure what exactly is causing this, but I thought by simplifying the .gn file we might discover something. With these changes I get:

> ls -lh target/debug/gn_out/obj/librusty_v8.a
-rw-r--r--  1 rld  staff   940K Mar 16 18:54 target/debug/gn_out/obj/librusty_v8.a

@ry
Copy link
Member Author

ry commented Mar 16, 2020

Link errors when running cargo test tho. Many undefined symbols in the .a.

@piscisaureus
Copy link
Member

Can you check what effect this has on the size of deno release executables on different platforms (linux in particular)?

@ry
Copy link
Member Author

ry commented Mar 17, 2020

I only have mac-debug to report for version 8040a7c

> ls -lh target/debug/gn_out/obj/librusty_v8.a
-rw-r--r--  1 rld  staff   604M Mar 16 23:42 target/debug/gn_out/obj/librusty_v8.a

-_-

@ry ry closed this Mar 17, 2020
@piscisaureus
Copy link
Member

I think it might still be worthwhile to land this because it makes the .gn file simpler. It's just that symbol_level=1 needs to stay.

@ry
Copy link
Member Author

ry commented Mar 17, 2020

Using symbol_level = 0 brings it down to 63M.

@ry ry reopened this Mar 17, 2020
@piscisaureus
Copy link
Member

Using symbol_level = 0 brings it down to 63M.

Is that desirable? It means that when v8 crashes you get no stack trace at all.

@piscisaureus piscisaureus merged commit c9b8208 into master Mar 21, 2020
@piscisaureus piscisaureus deleted the simplify_dotfile branch March 21, 2020 23:09
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