Skip to content

Commit

Permalink
handle darwin_x86_64 target cpu
Browse files Browse the repository at this point in the history
--
MOS_MIGRATED_REVID=106605250
  • Loading branch information
c-parsons authored and lberki committed Oct 30, 2015
1 parent 702c844 commit 5d96a28
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ filegroup(
name = "libunix",
srcs = select({
":darwin": ["//src/main/native:libunix.dylib"],
":darwin_x86_64": ["//src/main/native:libunix.dylib"],
"//conditions:default": ["//src/main/native:libunix.so"],
}),
visibility = [
Expand All @@ -29,6 +30,7 @@ filegroup(
outs = ["install_base_key" + suffix],
cmd = select({
":darwin": md5_cmd % "/sbin/md5",
":darwin_x86_64": md5_cmd % "/sbin/md5",
"//conditions:default": md5_cmd % "md5sum",
}),
) for suffix, embedded_tools in {
Expand Down Expand Up @@ -131,6 +133,12 @@ config_setting(
visibility = ["//visibility:public"],
)

config_setting(
name = "darwin_x86_64",
values = {"cpu": "darwin_x86_64"},
visibility = ["//visibility:public"],
)

config_setting(
name = "freebsd",
values = {"cpu": "freebsd"},
Expand Down
8 changes: 8 additions & 0 deletions src/main/cpp/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ cc_library(
"blaze_util_darwin.cc",
"blaze_util_posix.cc",
],
"//src:darwin_x86_64": [
"blaze_util_darwin.cc",
"blaze_util_posix.cc",
],
"//src:freebsd": [
"blaze_util_freebsd.cc",
"blaze_util_posix.cc",
Expand All @@ -29,6 +33,8 @@ cc_library(
linkopts = select({
"//src:darwin": [
],
"//src:darwin_x86_64": [
],
"//src:freebsd": [
],
"//conditions:default": [
Expand Down Expand Up @@ -60,6 +66,8 @@ cc_binary(
linkopts = select({
"//src:darwin": [
],
"//src:darwin_x86_64": [
],
"//src:freebsd": [
"-lprocstat",
],
Expand Down
2 changes: 2 additions & 0 deletions src/main/native/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ genrule(
name = "copy_link_jni_md_header",
srcs = select({
"//src:darwin": ["//tools/jdk:jni_md_header-darwin"],
"//src:darwin_x86_64": ["//tools/jdk:jni_md_header-darwin"],
"//src:freebsd": ["//tools/jdk:jni_md_header-freebsd"],
"//conditions:default": ["//tools/jdk:jni_md_header-linux"],
}),
Expand All @@ -20,6 +21,7 @@ filegroup(
name = "jni_os",
srcs = select({
"//src:darwin": ["unix_jni_darwin.cc"],
"//src:darwin_x86_64": ["unix_jni_darwin.cc"],
"//src:freebsd": ["unix_jni_freebsd.cc"],
"//conditions:default": ["unix_jni_linux.cc"],
}),
Expand Down
2 changes: 2 additions & 0 deletions src/main/tools/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ cc_binary(
name = "namespace-sandbox",
srcs = select({
"//src:darwin": ["namespace-sandbox-dummy.c"],
"//src:darwin_x86_64": ["namespace-sandbox-dummy.c"],
"//src:freebsd": ["namespace-sandbox-dummy.c"],
"//conditions:default": ["namespace-sandbox.c"],
}),
copts = ["-std=c99"],
linkopts = ["-lm"],
deps = select({
"//src:darwin": [],
"//src:darwin_x86_64": [],
"//src:freebsd": [],
"//conditions:default": [
":process-tools",
Expand Down

0 comments on commit 5d96a28

Please sign in to comment.