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

Unified Diff: tools/gn/secondary/third_party/openssl/BUILD.gn

Issue 232563008: Pull OpenSSL at 263283 to get new GN build file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
« BUILD.gn ('K') | « BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/secondary/third_party/openssl/BUILD.gn
diff --git a/tools/gn/secondary/third_party/openssl/BUILD.gn b/tools/gn/secondary/third_party/openssl/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..2445700eb20fb1244eeb43f43dc7aecb645c04d6
--- /dev/null
+++ b/tools/gn/secondary/third_party/openssl/BUILD.gn
@@ -0,0 +1,93 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Config for us and everybody else depending on openssl.
+config("openssl_config") {
+ include_dirs = []
+ if (cpu_arch == "x64") {
+ # Ensure the 64-bit opensslconf.h header is used in preference to the one
+ # in openssl/include.
+ include_dirs += [ "config/x64" ]
+ }
+
+ include_dirs += [ "openssl/include" ]
+}
+
+# Config internal to this build file.
+config("openssl_internal_config") {
+ visibility = ":*" # Only targets in this file can depend on this.
+}
+
+# The list of Skia files is kept in skia_gn_files.gypi. Read it.
Ryan Sleevi 2014/04/10 22:01:46 comment update?
+gypi_values = exec_script(
+ "//build/gypi_to_gn.py",
+ [ rebase_path("//third_party/openssl/openssl.gypi") ]
+ "scope",
+ [ "//third_party/openssl/openssl.gypi" ])
+
+component("openssl") {
+ sources = gypi_values.openssl_common_sources
+
+ defines = gypi_values.openssl_common_defines
+ defines += [
+ "PURIFY",
+ "MONOLITH",
+ ]
+
+ direct_dependent_configs = [ ":openssl_config" ]
+
+ cflags = []
+
+ # Also gets the include dirs from :openssl_config
+ include_dirs = [
+ ".",
+ "openssl",
+ "openssl/crypto",
+ "openssl/crypto/asn1",
+ "openssl/crypto/evp",
+ "openssl/crypto/modes",
+ ]
+
+ if (is_posix && !is_android) {
+ defines += [
+ # ENGINESDIR must be defined if OPENSSLDIR is.
+ "ENGINESDIR=\"/dev/null\"",
+ # Set to ubuntu default path for convenience. If necessary, override
+ # this at runtime with the SSL_CERT_DIR environment variable.
+ "OPENSSLDIR=\"/etc/ssl\"",
+ ]
+ }
+
+ if (cpu_arch == "x64") {
+ sources += gypi_values.openssl_x86_64_sources
+ sources -= gypi_values.openssl_x86_64_source_excludes
+ defines += gypi_values.openssl_x86_64_defines
+ } else if (cpu_arch == "x86") {
+ sources += gypi_values.openssl_x86_sources
+ sources -= gypi_values.openssl_x86_source_excludes
+ defines += gypi_values.openssl_x86_defines
+ } else if (cpu_arch == "arm") {
+ sources += gypi_values.openssl_arm_sources
+ sources -= gypi_values.openssl_arm_source_excludes
+ defines += gypi_values.openssl_arm_defines
+ } else if (cpu_arch == "mips") {
+ sources += gypi_values.openssl_mips_sources
+ sources -= gypi_values.openssl_mips_source_excludes
+ defines += gypi_values.openssl_mips_defines
+ }
+
+ if (is_clang) {
+ cflags += [
+ # OpenSSL has a few |if ((foo == NULL))| checks.
+ "-Wno-parentheses-equality",
+ # OpenSSL uses several function-style macros and then ignores the
+ # returned value.
+ "-Wno-unused-value",
+ ]
+ } else {
+ cflags += [
+ "-Wno-unused-variable",
+ ]
+ }
+}
« BUILD.gn ('K') | « BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698