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

Side by Side Diff: mojo/tools/mopy/gn.py

Issue 1705523002: Remove libjpeg and libjpeg_turbo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 10 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 | « build/secondary/third_party/libjpeg_turbo/BUILD.gn ('k') | third_party/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 """ 5 """
6 GN-related configuration functions, e.g., to produce a Config object from a GN 6 GN-related configuration functions, e.g., to produce a Config object from a GN
7 args.gn file). 7 args.gn file).
8 """ 8 """
9 9
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 gn_args["target_os"] = "android" 73 gn_args["target_os"] = "android"
74 elif config.target_os == Config.OS_FNL: 74 elif config.target_os == Config.OS_FNL:
75 gn_args["target_os"] = "fnl" 75 gn_args["target_os"] = "fnl"
76 gn_args["use_ozone"] = True 76 gn_args["use_ozone"] = True
77 gn_args["target_sysroot"] = config.values.get("target_sysroot", "") 77 gn_args["target_sysroot"] = config.values.get("target_sysroot", "")
78 gn_args["toolchain_prefix"] = config.values.get("toolchain_prefix", "") 78 gn_args["toolchain_prefix"] = config.values.get("toolchain_prefix", "")
79 elif config.target_os == Config.OS_IOS: 79 elif config.target_os == Config.OS_IOS:
80 gn_args["target_os"] = "ios" 80 gn_args["target_os"] = "ios"
81 gn_args["ios_deployment_target"] = "7.0" 81 gn_args["ios_deployment_target"] = "7.0"
82 gn_args["clang_use_chrome_plugins"] = False 82 gn_args["clang_use_chrome_plugins"] = False
83 if config.is_simulator:
84 gn_args["use_libjpeg_turbo"] = False
85 gn_args["use_ios_simulator"] = config.is_simulator 83 gn_args["use_ios_simulator"] = config.is_simulator
86 elif config.target_os == Config.OS_LINUX: 84 elif config.target_os == Config.OS_LINUX:
87 pass 85 pass
88 86
89 gn_args["target_cpu"] = config.target_cpu 87 gn_args["target_cpu"] = config.target_cpu
90 88
91 if "use_nacl" in config.values: 89 if "use_nacl" in config.values:
92 gn_args["mojo_use_nacl"] = config.values.get("use_nacl", False) 90 gn_args["mojo_use_nacl"] = config.values.get("use_nacl", False)
93 91
94 if "mojo_use_go" in config.values: 92 if "mojo_use_go" in config.values:
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 values = {} 156 values = {}
159 with open(gn_file, "r") as f: 157 with open(gn_file, "r") as f:
160 for line in f.readlines(): 158 for line in f.readlines():
161 line = re.sub("\s*#.*", "", line) 159 line = re.sub("\s*#.*", "", line)
162 result = re.match("^\s*(\w+)\s*=\s*(.*)\s*$", line) 160 result = re.match("^\s*(\w+)\s*=\s*(.*)\s*$", line)
163 if result: 161 if result:
164 key = result.group(1) 162 key = result.group(1)
165 value = result.group(2) 163 value = result.group(2)
166 values[key] = ast.literal_eval(TRANSLATIONS.get(value, value)) 164 values[key] = ast.literal_eval(TRANSLATIONS.get(value, value))
167 return values 165 return values
OLDNEW
« no previous file with comments | « build/secondary/third_party/libjpeg_turbo/BUILD.gn ('k') | third_party/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698