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

Unified Diff: build/config/jumbo.gni

Issue 2972533002: Support C and Objective-C in jumbo base scripts. (Closed)
Patch Set: Drop testing code again 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') | no next file with comments »
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..4a5f22f4a94ee0d2937adbe6ef5088857679df44 100644
--- a/build/config/jumbo.gni
+++ b/build/config/jumbo.gni
@@ -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" ]
+ }
+
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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698