OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/sanitizers/sanitizers.gni") | 5 import("//build/config/sanitizers/sanitizers.gni") |
6 import("//build/toolchain/goma.gni") | 6 import("//build/toolchain/goma.gni") |
7 | 7 |
8 declare_args() { | 8 declare_args() { |
9 # The platform on which the instrumented libraries are being built. | 9 # The platform on which the instrumented libraries are being built. |
10 instrumented_libraries_platform = "trusty" | 10 instrumented_libraries_platform = "trusty" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 ldflags = [ | 82 ldflags = [ |
83 # Add a relative RPATH entry to Chromium binaries. This puts instrumented | 83 # Add a relative RPATH entry to Chromium binaries. This puts instrumented |
84 # DSOs before system-installed versions in library search path. | 84 # DSOs before system-installed versions in library search path. |
85 "-Wl,-R,\$ORIGIN/instrumented_libraries_prebuilt/$sanitizer_type/lib", | 85 "-Wl,-R,\$ORIGIN/instrumented_libraries_prebuilt/$sanitizer_type/lib", |
86 "-Wl,-z,origin", | 86 "-Wl,-z,origin", |
87 ] | 87 ] |
88 } | 88 } |
89 } | 89 } |
90 | 90 |
91 if (use_locally_built_instrumented_libraries) { | 91 if (use_locally_built_instrumented_libraries) { |
92 if (instrumented_libraries_platform == "precise") { | 92 assert(instrumented_libraries_platform == "trusty", |
93 is_precise = true | 93 "Currently, the only supported platform is Trusty.") |
94 is_trusty = false | |
95 } else if (instrumented_libraries_platform == "trusty") { | |
96 is_precise = false | |
97 is_trusty = true | |
98 } else { | |
99 assert(false, "Unsupported platform " + instrumented_libraries_platform) | |
100 } | |
101 group("locally_built") { | 94 group("locally_built") { |
102 visibility = [ ":deps" ] | 95 visibility = [ ":deps" ] |
103 deps = [ | 96 deps = [ |
104 ":atk1.0", | 97 ":atk1.0", |
105 ":brltty", | 98 ":brltty", |
106 ":dee", | 99 ":dee", |
107 ":freetype", | 100 ":freetype", |
| 101 ":harfbuzz", |
108 ":libappindicator1", | 102 ":libappindicator1", |
109 ":libasound2", | 103 ":libasound2", |
110 ":libatk-bridge2.0-0", | 104 ":libatk-bridge2.0-0", |
111 ":libatspi2.0-0", | 105 ":libatspi2.0-0", |
112 ":libcairo2", | 106 ":libcairo2", |
113 ":libcap2", | 107 ":libcap2", |
114 ":libcredentialkit_pkcs11", | 108 ":libcredentialkit_pkcs11", |
115 ":libdbus-1-3", | 109 ":libdbus-1-3", |
116 ":libdbus-glib-1-2", | 110 ":libdbus-glib-1-2", |
117 ":libdbusmenu", | 111 ":libdbusmenu", |
118 ":libdbusmenu-glib4", | 112 ":libdbusmenu-glib4", |
119 ":libexpat1", | 113 ":libexpat1", |
120 ":libffi6", | 114 ":libffi6", |
121 ":libfontconfig1", | 115 ":libfontconfig1", |
122 ":libgconf-2-4", | 116 ":libgconf-2-4", |
123 ":libgcrypt11", | 117 ":libgcrypt11", |
124 ":libgdk-pixbuf2.0-0", | 118 ":libgdk-pixbuf2.0-0", |
125 ":libglib2.0-0", | 119 ":libglib2.0-0", |
126 ":libgnome-keyring0", | 120 ":libgnome-keyring0", |
127 ":libgpg-error0", | 121 ":libgpg-error0", |
| 122 ":libgtk-3-0", |
128 ":libgtk2.0-0", | 123 ":libgtk2.0-0", |
129 ":libgtk-3-0", | |
130 ":libnspr4", | 124 ":libnspr4", |
131 ":libp11-kit0", | 125 ":libp11-kit0", |
132 ":libpci3", | 126 ":libpci3", |
133 ":libpcre3", | 127 ":libpcre3", |
134 ":libpixman-1-0", | 128 ":libpixman-1-0", |
| 129 ":libsecret", |
| 130 ":libtasn1-6", |
135 ":libunity9", | 131 ":libunity9", |
136 ":libva1", | 132 ":libva1", |
137 ":libx11-6", | 133 ":libx11-6", |
138 ":libxau6", | 134 ":libxau6", |
139 ":libxcb1", | 135 ":libxcb1", |
140 ":libxcomposite1", | 136 ":libxcomposite1", |
141 ":libxcursor1", | 137 ":libxcursor1", |
142 ":libxdamage1", | 138 ":libxdamage1", |
143 ":libxdmcp6", | 139 ":libxdmcp6", |
144 ":libxext6", | 140 ":libxext6", |
145 ":libxfixes3", | 141 ":libxfixes3", |
146 ":libxi6", | 142 ":libxi6", |
147 ":libxinerama1", | 143 ":libxinerama1", |
148 ":libxrandr2", | 144 ":libxrandr2", |
149 ":libxrender1", | 145 ":libxrender1", |
150 ":libxss1", | 146 ":libxss1", |
151 ":libxtst6", | 147 ":libxtst6", |
152 ":nss", | 148 ":nss", |
153 ":pango1.0", | 149 ":pango1.0", |
154 ":pulseaudio", | 150 ":pulseaudio", |
155 ":udev", | 151 ":udev", |
156 ":zlib1g", | 152 ":zlib1g", |
157 ] | 153 ] |
158 if (is_precise) { | |
159 deps += [ ":libtasn1-3" ] | |
160 } | |
161 if (is_trusty) { | |
162 deps += [ | |
163 ":harfbuzz", | |
164 ":libsecret", | |
165 ":libtasn1-6", | |
166 ] | |
167 } | |
168 if (is_msan) { | 154 if (is_msan) { |
169 deps += [ ":libcups2" ] | 155 deps += [ ":libcups2" ] |
170 } | 156 } |
171 if (!is_tsan) { | 157 if (!is_tsan) { |
172 deps += [ ":libpng12-0" ] | 158 deps += [ ":libpng12-0" ] |
173 } | 159 } |
174 data = [ | 160 data = [ |
175 "${root_out_dir}/instrumented_libraries/${sanitizer_type}/lib", | 161 "${root_out_dir}/instrumented_libraries/${sanitizer_type}/lib", |
176 ] | 162 ] |
177 } | 163 } |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 pre_build = "scripts/pre-build/libasound2.sh" | 339 pre_build = "scripts/pre-build/libasound2.sh" |
354 } | 340 } |
355 | 341 |
356 instrumented_library("libatk-bridge2.0-0") { | 342 instrumented_library("libatk-bridge2.0-0") { |
357 extra_configure_flags = [ "--disable-static" ] | 343 extra_configure_flags = [ "--disable-static" ] |
358 } | 344 } |
359 | 345 |
360 instrumented_library("libatspi2.0-0") { | 346 instrumented_library("libatspi2.0-0") { |
361 extra_configure_flags = [ | 347 extra_configure_flags = [ |
362 "--disable-static", | 348 "--disable-static", |
363 "--disable-introspection" | 349 "--disable-introspection", |
364 ] | 350 ] |
365 } | 351 } |
366 | 352 |
367 instrumented_library("libcairo2") { | 353 instrumented_library("libcairo2") { |
368 extra_configure_flags = [ | 354 extra_configure_flags = [ |
369 "--disable-gtk-doc", | 355 "--disable-gtk-doc", |
370 "--disable-static", | 356 "--disable-static", |
371 ] | 357 ] |
372 } | 358 } |
373 | 359 |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 instrumented_library("libxau6") { | 683 instrumented_library("libxau6") { |
698 extra_configure_flags = [ "--disable-static" ] | 684 extra_configure_flags = [ "--disable-static" ] |
699 } | 685 } |
700 | 686 |
701 instrumented_library("libxcb1") { | 687 instrumented_library("libxcb1") { |
702 extra_configure_flags = [ | 688 extra_configure_flags = [ |
703 "--disable-build-docs", | 689 "--disable-build-docs", |
704 "--disable-static", | 690 "--disable-static", |
705 ] | 691 ] |
706 pre_build = "scripts/pre-build/autoreconf.sh" | 692 pre_build = "scripts/pre-build/autoreconf.sh" |
707 if (is_precise) { | |
708 patch = "patches/libxcb1.precise.diff" | |
709 } | |
710 } | 693 } |
711 | 694 |
712 instrumented_library("libxcomposite1") { | 695 instrumented_library("libxcomposite1") { |
713 extra_configure_flags = [ "--disable-static" ] | 696 extra_configure_flags = [ "--disable-static" ] |
714 } | 697 } |
715 | 698 |
716 instrumented_library("libxcursor1") { | 699 instrumented_library("libxcursor1") { |
717 extra_configure_flags = [ "--disable-static" ] | 700 extra_configure_flags = [ "--disable-static" ] |
718 } | 701 } |
719 | 702 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 # Pango is normally used with dynamically loaded modules. However, | 772 # Pango is normally used with dynamically loaded modules. However, |
790 # ensuring pango is able to find instrumented versions of those modules | 773 # ensuring pango is able to find instrumented versions of those modules |
791 # is a huge pain in the neck. Let's link them statically instead, and | 774 # is a huge pain in the neck. Let's link them statically instead, and |
792 # hope for the best. | 775 # hope for the best. |
793 "--with-included-modules=yes", | 776 "--with-included-modules=yes", |
794 ] | 777 ] |
795 } | 778 } |
796 | 779 |
797 instrumented_library("pulseaudio") { | 780 instrumented_library("pulseaudio") { |
798 # New location of libpulsecommon. | 781 # New location of libpulsecommon. |
799 if (is_precise) { | 782 package_ldflags = [ "-Wl,-R,XORIGIN/pulseaudio/." ] |
800 patch = "patches/pulseaudio.precise.diff" | |
801 } | |
802 if (is_trusty) { | |
803 package_ldflags = [ "-Wl,-R,XORIGIN/pulseaudio/." ] | |
804 } | |
805 extra_configure_flags = [ | 783 extra_configure_flags = [ |
806 "--disable-static", | 784 "--disable-static", |
807 | 785 |
808 # From debian/rules. | 786 # From debian/rules. |
809 "--enable-x11", | 787 "--enable-x11", |
810 "--disable-hal-compat", | 788 "--disable-hal-compat", |
811 | 789 |
812 # Disable some ARM-related code that fails compilation. No idea why | 790 # Disable some ARM-related code that fails compilation. No idea why |
813 # this even impacts x86-64 builds. | 791 # this even impacts x86-64 builds. |
814 "--disable-neon-opt", | 792 "--disable-neon-opt", |
(...skipping 11 matching lines...) Expand all Loading... |
826 "--disable-gudev", | 804 "--disable-gudev", |
827 ] | 805 ] |
828 pre_build = "scripts/pre-build/udev.sh" | 806 pre_build = "scripts/pre-build/udev.sh" |
829 } | 807 } |
830 | 808 |
831 instrumented_library("zlib1g") { | 809 instrumented_library("zlib1g") { |
832 # --disable-static is not supported | 810 # --disable-static is not supported |
833 patch = "patches/zlib1g.diff" | 811 patch = "patches/zlib1g.diff" |
834 } | 812 } |
835 } | 813 } |
OLD | NEW |