summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/installer/mac/third_party/xz/lzma_decompress.export21
-rw-r--r--chrome/installer/mac/third_party/xz/xz.gyp10
2 files changed, 30 insertions, 1 deletions
diff --git a/chrome/installer/mac/third_party/xz/lzma_decompress.export b/chrome/installer/mac/third_party/xz/lzma_decompress.export
new file mode 100644
index 0000000..87b51d7
--- /dev/null
+++ b/chrome/installer/mac/third_party/xz/lzma_decompress.export
@@ -0,0 +1,21 @@
+# Copyright (c) 2010 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This is a list of symbols to export from liblzma_decompress.dylib. It is not
+# a complete list of symbols ordinarily exported by liblzma for decompression.
+# It's limited to the set of symbols actually needed by targets that depend
+# on liblzma_decompress in Chromium. Currently, this only includes xzdec and
+# goobspatch.
+#
+# Trimming the set of exported symbols reduces the number of "roots" used for
+# dead-code stripping. With fewer roots considered "live," more code may wind
+# up "dead," which can reduce the size of the library.
+#
+# This approach reduces the size of liblzma_decompress by 16kB.
+
+_lzma_code
+_lzma_end
+_lzma_physmem
+_lzma_stream_decoder
+_lzma_version_string
diff --git a/chrome/installer/mac/third_party/xz/xz.gyp b/chrome/installer/mac/third_party/xz/xz.gyp
index 37816af..c71cfa5 100644
--- a/chrome/installer/mac/third_party/xz/xz.gyp
+++ b/chrome/installer/mac/third_party/xz/xz.gyp
@@ -12,7 +12,7 @@
'check_crc32': 1,
'check_crc64': 0,
'check_sha256': 0,
- 'coder_lzma1': 1,
+ 'coder_lzma1': 0,
'coder_lzma2': 1,
'coder_delta': 0,
'coder_bcj_arm': 0,
@@ -288,8 +288,16 @@
# is distributed in Google Chrome update disk images and is used by more
# than one tool.
'type': 'shared_library',
+
'xcode_settings': {
+ # The library will reside in the same directory as executables linked
+ # against it.
'DYLIB_INSTALL_NAME_BASE': '@loader_path',
+
+ # Trim the list of exported symbols to just those needed by
+ # dependents. This limits the set of "roots" seen during dead-code
+ # stripping and reduces the size of the library.
+ 'EXPORTED_SYMBOLS_FILE': 'lzma_decompress.export',
},
'defines': [