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

Unified Diff: build/config/jumbo.gni

Issue 2972533002: Support C and Objective-C in jumbo base scripts. (Closed)
Patch Set: Fixup for fixup for core/editing for mac and objective-c Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/config/merge_for_jumbo.py » ('j') | build/config/merge_for_jumbo.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/jumbo.gni
diff --git a/build/config/jumbo.gni b/build/config/jumbo.gni
index baf19f1b6bf91c39a5a3c25aded68027de6485cc..a04d7bf5aab32453ecd20de4c8e0a687fddeef8d 100644
--- a/build/config/jumbo.gni
+++ b/build/config/jumbo.gni
@@ -7,7 +7,7 @@ import("//build/split_static_library.gni") # When someone uses that target_type
declare_args() {
# If true, use a jumbo build (files compiled together) to speed up
# compilation.
- use_jumbo_build = false
+ use_jumbo_build = !is_official_build && !(is_android && !is_clang)
Daniel Bratell 2017/07/04 11:37:44 Just to make cq test it. Must not be committed.
# A target to exclude from jumbo builds, for optimal round trip time
# when frequently changing a single cpp file.
@@ -86,6 +86,23 @@ template("jumbo_target") {
current_file_index += 1
}
+ has_objective_c_file = false
+ has_c_file = false
+ foreach(source_file, invoker.sources) {
+ source_ext = get_path_info(source_file, "extension")
+ if (source_ext == "c") {
+ has_c_file = true
+ } else if (source_ext == "mm") {
+ has_objective_c_file = true
+ }
+ }
+ if (has_c_file) {
+ jumbo_files += [ "$gen_target_dir/" + target_name + "_jumbo_c.c" ]
+ }
+ if (has_objective_c_file) {
+ jumbo_files += [ "$gen_target_dir/" + target_name + "_jumbo_mm.mm" ]
+ }
Dirk Pranke 2017/07/04 17:15:15 Clever. I hadn't thought of an obvious way to do t
+
merge_action_name = target_name + "__jumbo_merge"
# Create an action that calls a script that merges all the source files.
@@ -125,11 +142,9 @@ template("jumbo_target") {
sources = jumbo_files + excluded_sources
# Need to keep the headers in sources so that dependency checks
- # work, and we need to keep Objective-C code since they
- # cannot be merged into a cc file (FIXME).
+ # work.
foreach(source_file, invoker.sources) {
- source_ext = get_path_info(source_file, "extension")
- if (source_ext == "h" || source_ext == "mm") {
+ if (get_path_info(source_file, "extension") == "h") {
sources += [ source_file ]
}
}
« no previous file with comments | « no previous file | build/config/merge_for_jumbo.py » ('j') | build/config/merge_for_jumbo.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698