1
0
Fork 0
mirror of https://github.com/rubyjs/mini_racer synced 2023-03-27 23:21:28 -04:00

hide all libv8 symbols on ELF targets

This gives a nice binary size reduction and may allow us to eliminate
the mini_racer_loader shim:

         text           data    bss
before:  63987419       718108  110676
 after:  56535503       454196  110676

append_ldflags is available in Ruby 2.3+ mkmf.rb, allowing us
to probe for supported LDFLAGS without extra conditionals.
This commit is contained in:
Sam Saffron 2022-02-24 11:26:01 +11:00
parent 9cf4ed6d92
commit 4414ea40f9
No known key found for this signature in database
GPG key ID: B9606168D2FFD9F5

View file

@ -70,6 +70,9 @@ end
Libv8::Node.configure_makefile Libv8::Node.configure_makefile
# --exclude-libs is only for i386 PE and ELF targeted ports
append_ldflags("-Wl,--exclude-libs=ALL ")
if enable_config('asan') if enable_config('asan')
$CXXFLAGS.insert(0, " -fsanitize=address ") $CXXFLAGS.insert(0, " -fsanitize=address ")
$LDFLAGS.insert(0, " -fsanitize=address ") $LDFLAGS.insert(0, " -fsanitize=address ")