mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +02:00
Attempt to reduce file size of binaries at link time
This commit is contained in:
parent
b3dd54d550
commit
c76ae06fd1
36
binding.gyp
36
binding.gyp
@ -29,10 +29,22 @@
|
|||||||
'Release': {
|
'Release': {
|
||||||
'msvs_settings': {
|
'msvs_settings': {
|
||||||
'VCCLCompilerTool': {
|
'VCCLCompilerTool': {
|
||||||
'ExceptionHandling': 1
|
'ExceptionHandling': 1,
|
||||||
|
'WholeProgramOptimization': 'true'
|
||||||
|
},
|
||||||
|
'VCLibrarianTool': {
|
||||||
|
'AdditionalOptions': [
|
||||||
|
'/LTCG:INCREMENTAL'
|
||||||
|
]
|
||||||
},
|
},
|
||||||
'VCLinkerTool': {
|
'VCLinkerTool': {
|
||||||
'ImageHasSafeExceptionHandlers': 'false'
|
'ImageHasSafeExceptionHandlers': 'false',
|
||||||
|
'OptimizeReferences': 2,
|
||||||
|
'EnableCOMDATFolding': 2,
|
||||||
|
'LinkIncremental': 1,
|
||||||
|
'AdditionalOptions': [
|
||||||
|
'/LTCG:INCREMENTAL'
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'msvs_disabled_warnings': [
|
'msvs_disabled_warnings': [
|
||||||
@ -121,7 +133,7 @@
|
|||||||
'../vendor/lib/libglib-2.0.0.dylib',
|
'../vendor/lib/libglib-2.0.0.dylib',
|
||||||
'../vendor/lib/libgobject-2.0.0.dylib',
|
'../vendor/lib/libgobject-2.0.0.dylib',
|
||||||
# Ensure runtime linking is relative to sharp.node
|
# Ensure runtime linking is relative to sharp.node
|
||||||
'-rpath \'@loader_path/../../vendor/lib\''
|
'-Wl,-s -rpath \'@loader_path/../../vendor/lib\''
|
||||||
]
|
]
|
||||||
}],
|
}],
|
||||||
['OS == "linux"', {
|
['OS == "linux"', {
|
||||||
@ -164,7 +176,7 @@
|
|||||||
'../vendor/lib/libxml2.so',
|
'../vendor/lib/libxml2.so',
|
||||||
'../vendor/lib/libz.so',
|
'../vendor/lib/libz.so',
|
||||||
# Ensure runtime linking is relative to sharp.node
|
# Ensure runtime linking is relative to sharp.node
|
||||||
'-Wl,--disable-new-dtags -Wl,-rpath=\'$${ORIGIN}/../../vendor/lib\''
|
'-Wl,-s -Wl,--disable-new-dtags -Wl,-rpath=\'$${ORIGIN}/../../vendor/lib\''
|
||||||
]
|
]
|
||||||
}]
|
}]
|
||||||
]
|
]
|
||||||
@ -204,10 +216,22 @@
|
|||||||
['OS == "win"', {
|
['OS == "win"', {
|
||||||
'msvs_settings': {
|
'msvs_settings': {
|
||||||
'VCCLCompilerTool': {
|
'VCCLCompilerTool': {
|
||||||
'ExceptionHandling': 1
|
'ExceptionHandling': 1,
|
||||||
|
'WholeProgramOptimization': 'true'
|
||||||
|
},
|
||||||
|
'VCLibrarianTool': {
|
||||||
|
'AdditionalOptions': [
|
||||||
|
'/LTCG:INCREMENTAL'
|
||||||
|
]
|
||||||
},
|
},
|
||||||
'VCLinkerTool': {
|
'VCLinkerTool': {
|
||||||
'ImageHasSafeExceptionHandlers': 'false'
|
'ImageHasSafeExceptionHandlers': 'false',
|
||||||
|
'OptimizeReferences': 2,
|
||||||
|
'EnableCOMDATFolding': 2,
|
||||||
|
'LinkIncremental': 1,
|
||||||
|
'AdditionalOptions': [
|
||||||
|
'/LTCG:INCREMENTAL'
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'msvs_disabled_warnings': [
|
'msvs_disabled_warnings': [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user