Skip to content

Commit

Permalink
hide all libv8 symbols on ELF targets
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
SamSaffron committed Feb 24, 2022
1 parent 9cf4ed6 commit 4414ea4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ext/mini_racer_extension/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@

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')
$CXXFLAGS.insert(0, " -fsanitize=address ")
$LDFLAGS.insert(0, " -fsanitize=address ")
Expand Down

0 comments on commit 4414ea4

Please sign in to comment.