aboutsummaryrefslogtreecommitdiffhomepage
path: root/gn/BUILD.gn
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2016-10-20 10:17:47 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-10-20 14:57:49 +0000
commit43c2526665fb0c5a2f8c5793b9326ebf4ef3daca (patch)
tree437f3c48766ea4ee700593a759784ad559e58ae6 /gn/BUILD.gn
parent580046bc1a09f362f7677824244ece697472fd66 (diff)
Viewer on Mac.
- Support ObjC / ObjC++ - Build SDL on Mac. - Build viewer on Mac. Patched from Jim's CL. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3760 Change-Id: I12663f2ed2969e22f51aefed560fbc22b2524167 Reviewed-on: https://skia-review.googlesource.com/3760 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'gn/BUILD.gn')
-rw-r--r--gn/BUILD.gn25
1 files changed, 25 insertions, 0 deletions
diff --git a/gn/BUILD.gn b/gn/BUILD.gn
index 0ea41a8253..5d6a82ae38 100644
--- a/gn/BUILD.gn
+++ b/gn/BUILD.gn
@@ -200,6 +200,7 @@ config("default") {
config("warnings") {
cflags = []
cflags_cc = []
+ cflags_objc = []
if (is_win) {
cflags += [
"/W3", # Turn on lots of warnings.
@@ -288,6 +289,10 @@ config("warnings") {
"-Wno-c++98-compat-pedantic",
"-Wno-undefined-func-template",
]
+ cflags_objc += [
+ "-Wno-direct-ivar-access",
+ "-Wno-objc-interface-ivars",
+ ]
}
}
}
@@ -484,6 +489,26 @@ toolchain("gcc_like") {
description = "compile {{source}}"
}
+ tool("objc") {
+ depfile = "{{output}}.d"
+ command = "$cc_wrapper $cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_objc}} -c {{source}} -o {{output}}"
+ depsformat = "gcc"
+ outputs = [
+ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o",
+ ]
+ description = "compile {{source}}"
+ }
+
+ tool("objcxx") {
+ depfile = "{{output}}.d"
+ command = "$cc_wrapper $cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} {{cflags_objc}} -c {{source}} -o {{output}}"
+ depsformat = "gcc"
+ outputs = [
+ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o",
+ ]
+ description = "compile {{source}}"
+ }
+
tool("asm") {
depfile = "{{output}}.d"
command = "$cc_wrapper $cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{asmflags}} -c {{source}} -o {{output}}"