Chromium Code Reviews| Index: mojo/tools/mopy/gn.py |
| diff --git a/mojo/tools/mopy/gn.py b/mojo/tools/mopy/gn.py |
| index 47253ea3f18213c579bd3540ab91dad582313b79..76a0be8dd270e554b16fce1bb714701d7e01253e 100644 |
| --- a/mojo/tools/mopy/gn.py |
| +++ b/mojo/tools/mopy/gn.py |
| @@ -26,6 +26,8 @@ def BuildDirectoryForConfig(config, src_root): |
| subdir += config.target_cpu + "_" |
| elif config.target_os == Config.OS_IOS: |
| subdir += "ios_" |
| + elif config.target_os == Config.OS_FNL: |
|
viettrungluu
2015/09/15 23:48:23
Do these checks in alphabetical order.
cdotstout
2015/09/16 22:01:00
Done.
|
| + subdir += "fnl_" |
| if config.is_simulator: |
| subdir += "sim_" |
| if config.is_official_build: |
| @@ -40,6 +42,11 @@ def BuildDirectoryForConfig(config, src_root): |
| subdir += "_dcheck" |
| return os.path.join(src_root, "out", subdir) |
| +def TargetSysrootForConfig(config, src_root): |
|
viettrungluu
2015/09/15 23:48:23
Needs a docstring.
cdotstout
2015/09/16 22:01:00
Unused, removed.
|
| + sysroot = "" |
| + if config.target_os == Config.OS_FNL: |
| + sysroot = os.path.join(src_root, "fnl_buildroot") |
| + return sysroot |
| def GNArgsForConfig(config): |
| """ |
| @@ -56,7 +63,8 @@ def GNArgsForConfig(config): |
| gn_args["is_clang"] = bool(config.is_clang) |
| else: |
| gn_args["is_clang"] = config.target_os not in (Config.OS_ANDROID, |
| - Config.OS_WINDOWS) |
| + Config.OS_WINDOWS, |
| + Config.OS_FNL) |
|
viettrungluu
2015/09/15 23:48:23
Alphabetical order.
cdotstout
2015/09/16 22:01:00
Done.
|
| if config.values.get("use_goma"): |
| gn_args["use_goma"] = True |
| @@ -79,8 +87,15 @@ def GNArgsForConfig(config): |
| gn_args["use_aura"] = False |
| gn_args["use_glib"] = False |
| gn_args["use_system_harfbuzz"] = False |
| + elif config.target_os == Config.OS_FNL: |
|
viettrungluu
2015/09/15 23:48:23
"
cdotstout
2015/09/16 22:01:00
Done.
|
| + gn_args["target_os"] = "fnl" |
| + gn_args["use_aura"] = False |
| + gn_args["use_glib"] = False |
| + gn_args["use_ozone"] = True |
| + gn_args["use_system_harfbuzz"] = False |
| gn_args["target_cpu"] = config.target_cpu |
| + gn_args["target_sysroot"] = config.values.get("target_sysroot", "") |
| if "use_nacl" in config.values: |
| gn_args["mojo_use_nacl"] = config.values.get("use_nacl", False) |
| @@ -132,6 +147,7 @@ def ConfigForGNArgs(args): |
| config_args["target_cpu"] = args.get("target_cpu") |
| config_args["dcheck_always_on"] = args.get("dcheck_always_on") |
| config_args["is_simulator"] = args.get("use_ios_simulator", False) |
| + config_args["target_sysroot"] = args.get("target_sysroot") |
| return Config(**config_args) |