build: don't enable --gc-sections on sunos
authorBen Noordhuis <info@bnoordhuis.nl>
Sat, 6 Jul 2013 16:48:52 +0000 (18:48 +0200)
committerBen Noordhuis <info@bnoordhuis.nl>
Sat, 6 Jul 2013 16:49:02 +0000 (18:49 +0200)
The SunOS linker doesn't support it. Fixes build breakage introduced
in commit 9b3de60.

common.gypi

index 14054ce..5572c75 100644 (file)
@@ -50,7 +50,6 @@
       },
       'Release': {
         'cflags': [ '-O3', '-ffunction-sections', '-fdata-sections' ],
-        'ldflags': [ '-Wl,--gc-sections' ],
         'conditions': [
           ['target_arch=="x64"', {
             'msvs_configuration_platform': 'x64',
@@ -59,6 +58,9 @@
             'cflags': [ '-fno-omit-frame-pointer' ],
             # pull in V8's postmortem metadata
             'ldflags': [ '-Wl,-z,allextract' ]
+          }, {
+            # Doesn't work with the Solaris linker.
+            'ldflags': [ '-Wl,--gc-sections' ],
           }],
           ['clang == 0 and gcc_version >= 40', {
             'cflags': [ '-fno-tree-vrp' ],  # Work around compiler bug.