Skip to content
This repository was archived by the owner on Apr 17, 2024. It is now read-only.

Commit

Permalink
Add support for darwin_arm64 cpu in curl build file.
Browse files Browse the repository at this point in the history
also remove unused config_settings from cc build file.

PiperOrigin-RevId: 425347250
  • Loading branch information
juergw authored and copybara-github committed Jan 31, 2022
1 parent 7682a6f commit 0d59673
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
11 changes: 0 additions & 11 deletions cc/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -671,17 +671,6 @@ cc_library(
deps = [":key_access"],
)

# Settings for building in various environments.
config_setting(
name = "linux_x86_64",
values = {"cpu": "k8"},
)

config_setting(
name = "mac_x86_64",
values = {"cpu": "darwin"},
)

# tests

cc_test(
Expand Down
19 changes: 19 additions & 0 deletions cc/third_party/curl.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ config_setting(
values = {"cpu": "darwin"},
)

config_setting(
name = "darwin_arm64",
values = {
"cpu": "darwin_arm64",
},
)

cc_library(
name = "curl",
srcs = [
Expand Down Expand Up @@ -216,6 +223,9 @@ cc_library(
":mac_x86_64": [
"lib/vtls/darwinssl.c",
],
":darwin_arm64": [
"lib/vtls/darwinssl.c",
],
":linux_x86_64": [
"lib/vtls/openssl.c",
],
Expand Down Expand Up @@ -245,6 +255,9 @@ cc_library(
":mac_x86_64": [
"-fno-constant-cfstrings",
],
":darwin_arm64": [
"-fno-constant-cfstrings",
],
":linux_x86_64": [
"-DCURL_MAX_WRITE_SIZE=65536",
],
Expand All @@ -258,6 +271,12 @@ cc_library(
"-Wl,-framework",
"-Wl,Security",
],
":darwin_arm64": [
"-Wl,-framework",
"-Wl,CoreFoundation",
"-Wl,-framework",
"-Wl,Security",
],
":linux_x86_64": [
"-lrt",
],
Expand Down

0 comments on commit 0d59673

Please sign in to comment.