Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: build/jumbo.gni

Issue 2822243002: Fixup jumbo.gni (-Wno-subobject-linkage)
Patch Set: Fixup base scripts for mac (Objective C) Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | build/jumbo.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 import("//build/split_static_library.gni") # When someone uses that target_type 1 import("//build/split_static_library.gni") # When someone uses that target_type
2 2
3 declare_args() { 3 declare_args() {
4 # If true, use a jumbo build (files compiled together) to speed up 4 # If true, use a jumbo build (files compiled together) to speed up
5 # compilation. 5 # compilation.
6 use_blink_jumbo_build = true 6 use_blink_jumbo_build = true
7 7
8 # A target to exclude from jumbo builds, for optimal round trip time 8 # A target to exclude from jumbo builds, for optimal round trip time
9 # when frequently changing a single cpp file. 9 # when frequently changing a single cpp file.
10 jumbo_build_excluded = "" 10 jumbo_build_excluded = ""
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 target(target_type, target_name) { 70 target(target_type, target_name) {
71 deps = [] 71 deps = []
72 if (defined(invoker.deps)) { 72 if (defined(invoker.deps)) {
73 deps += invoker.deps 73 deps += invoker.deps
74 } 74 }
75 75
76 # Take everything else not handled above from the invoker. 76 # Take everything else not handled above from the invoker.
77 variables_to_not_forward = [ "deps" ] 77 variables_to_not_forward = [ "deps" ]
78 if (use_jumbo_build) { 78 if (use_jumbo_build) {
79 deps += [ ":" + target_name + "_jumbo" ] 79 deps += [ ":" + target_name + "_jumbo" ]
80
81 if (is_android && !is_clang) {
82 cflags = []
83 if (defined(invoker.cflags)) {
84 cflags += invoker.cflags
85 }
86 cflags += [ "-Wno-subobject-linkage" ]
87 variables_to_not_forward += [ "cflags" ]
88 }
89
80 variables_to_not_forward += [ "sources" ] 90 variables_to_not_forward += [ "sources" ]
81 assert(jumbo_files != []) 91 assert(jumbo_files != [])
82 sources = jumbo_files + excluded_sources 92 sources = jumbo_files + excluded_sources
83 93
84 # And the headers so that dependency checks work. 94 # And the headers so that dependency checks work.
85 foreach(source_file, invoker.sources) { 95 foreach(source_file, invoker.sources) {
86 if (get_path_info(source_file, "extension") == "h") { 96 if (get_path_info(source_file, "extension") == "h") {
87 sources += [ source_file ] 97 sources += [ source_file ]
88 } 98 }
89 } 99 }
100
101 # Can't mix in Objective-C code in a cc file (FIXME).
102 foreach(source_file, invoker.sources) {
103 if (get_path_info(source_file, "extension") == "mm") {
104 sources += [ source_file ]
105 }
106 }
90 } 107 }
91 forward_variables_from(invoker, "*", variables_to_not_forward) 108 forward_variables_from(invoker, "*", variables_to_not_forward)
92 } 109 }
93 } 110 }
94 111
95 set_defaults("jumbo_target") { 112 set_defaults("jumbo_target") {
96 # This sets the default list of configs when the content_source_set target 113 # This sets the default list of configs when the content_source_set target
97 # is defined. The default_compiler_configs comes from BUILDCONFIG.gn and 114 # is defined. The default_compiler_configs comes from BUILDCONFIG.gn and
98 # is the list normally applied to static libraries and source sets. 115 # is the list normally applied to static libraries and source sets.
99 configs = default_compiler_configs 116 configs = default_compiler_configs
100 } 117 }
OLDNEW
« no previous file with comments | « no previous file | build/jumbo.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698