5d032ecb8f
This reverts commit c766370d86
.
Reason for revert: speculative -- trying to fix Debian breaks (pdf?)
Original change's description:
> always optimize third_party code
>
> Change-Id: I5b2244460a4760e9336640f597d0f74c374a0d04
> Reviewed-on: https://skia-review.googlesource.com/155641
> Commit-Queue: Mike Klein <mtklein@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Auto-Submit: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=mtklein@google.com,brianosman@google.com
Change-Id: I5467c95f9487c31e6f538f13579e490cdaeeee2e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/155607
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
59 lines
1.4 KiB
Plaintext
59 lines
1.4 KiB
Plaintext
# Copyright 2016 Google Inc.
|
|
#
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
template("third_party") {
|
|
enabled = !defined(invoker.enabled) || invoker.enabled
|
|
config(target_name + "_public") {
|
|
if (enabled) {
|
|
cflags = []
|
|
if (defined(invoker.public_defines)) {
|
|
defines = invoker.public_defines
|
|
}
|
|
if (is_win) {
|
|
include_dirs = invoker.public_include_dirs
|
|
} else {
|
|
foreach(dir, invoker.public_include_dirs) {
|
|
cflags += [
|
|
"-isystem",
|
|
rebase_path(dir),
|
|
]
|
|
}
|
|
}
|
|
} else {
|
|
not_needed(invoker, "*")
|
|
}
|
|
}
|
|
source_set(target_name) {
|
|
if (enabled) {
|
|
forward_variables_from(invoker, "*", [ "public_include_dirs" ])
|
|
public_configs = [ ":" + target_name + "_public" ]
|
|
|
|
# Warnings are just noise if we're not maintaining the code.
|
|
if (is_win) {
|
|
cflags = [ "/w" ]
|
|
} else {
|
|
cflags = [ "-w" ]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
set_defaults("third_party") {
|
|
configs = default_configs
|
|
if (!is_official_build) {
|
|
# Official builds don't have warnings to begin with.
|
|
configs -= [ "//gn:warnings" ]
|
|
}
|
|
}
|
|
|
|
template("system") {
|
|
config(target_name + "_public") {
|
|
forward_variables_from(invoker, "*", [])
|
|
}
|
|
group(target_name) {
|
|
public_configs = [ ":" + target_name + "_public" ]
|
|
}
|
|
}
|