Fixes for Windows build
diff --git a/BUILD.gn b/BUILD.gn
index a82b12f..d6caff9 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -38,61 +38,61 @@
all_sources = crypto_sources + ssl_sources
-if (is_win) {
- public_configs = [ ":no_asm_config" ]
-} else {
- # This has no sources on some platforms so must be a source_set.
- source_set("boringssl_asm") {
- visibility = [ ":*" ] # Only targets in this file can depend on this.
+# This has no sources on some platforms so must be a source_set.
+source_set("boringssl_asm") {
+ visibility = [ ":*" ] # Only targets in this file can depend on this.
- defines = []
- sources = []
- include_dirs = [ "src/include" ]
+ defines = []
+ sources = []
+ include_dirs = [ "src/include" ]
- if ((current_cpu == "arm" || current_cpu == "arm64") && is_android && is_clang) {
- # Disable the integrated assembler and use the one shipped with the NDK.
- import("//build/config/android/config.gni")
- rebased_android_toolchain_root =
- rebase_path(android_toolchain_root, root_build_dir)
- asmflags = [
- "-fno-integrated-as",
- "-B${rebased_android_toolchain_root}/bin",
- ]
- }
+ if ((current_cpu == "arm" || current_cpu == "arm64") && is_android && is_clang) {
+ # Disable the integrated assembler and use the one shipped with the NDK.
+ import("//build/config/android/config.gni")
+ rebased_android_toolchain_root =
+ rebase_path(android_toolchain_root, root_build_dir)
+ asmflags = [
+ "-fno-integrated-as",
+ "-B${rebased_android_toolchain_root}/bin",
+ ]
+ }
- if (is_msan) {
- public_configs = [ ":no_asm_config" ]
- } else if (current_cpu == "x64") {
- if (is_mac) {
- sources += crypto_sources_mac_x86_64
- } else if (is_linux || is_android) {
- sources += crypto_sources_linux_x86_64
- } else {
- public_configs = [ ":no_asm_config" ]
- }
- } else if (current_cpu == "x86") {
- if (is_mac) {
- sources += crypto_sources_mac_x86
- } else if (is_linux || is_android) {
- sources += crypto_sources_linux_x86
- } else {
- public_configs = [ ":no_asm_config" ]
- }
- } else if (current_cpu == "arm" && (is_linux || is_android)) {
- sources += crypto_sources_linux_arm
- } else if (current_cpu == "arm64" && (is_linux || is_android)) {
- sources += crypto_sources_linux_aarch64
+ if (is_msan) {
+ public_configs = [ ":no_asm_config" ]
+ } else if (current_cpu == "x64") {
+ if (is_mac) {
+ sources += crypto_sources_mac_x86_64
+ } else if (is_linux || is_android) {
+ sources += crypto_sources_linux_x86_64
} else {
public_configs = [ ":no_asm_config" ]
}
+ } else if (current_cpu == "x86") {
+ if (is_mac) {
+ sources += crypto_sources_mac_x86
+ } else if (is_linux || is_android) {
+ sources += crypto_sources_linux_x86
+ } else {
+ public_configs = [ ":no_asm_config" ]
+ }
+ } else if (current_cpu == "arm" && (is_linux || is_android)) {
+ sources += crypto_sources_linux_arm
+ } else if (current_cpu == "arm64" && (is_linux || is_android)) {
+ sources += crypto_sources_linux_aarch64
+ } else {
+ public_configs = [ ":no_asm_config" ]
}
}
component("boringssl") {
sources = all_sources
- deps = [
- ":boringssl_asm",
- ]
+ if (is_win) {
+ configs += [ ":no_asm_config" ]
+ } else {
+ deps = [
+ ":boringssl_asm",
+ ]
+ }
public_configs = [ ":external_config" ]
configs += [ ":internal_config" ]