Unverified Commit 47515508 by Yesudeep Mangalapilly Committed by GitHub

Revert previous linker additions for FreeBSD as the problem is Bazel using…

Revert previous linker additions for FreeBSD as the problem is Bazel using /usr/bin/clang instead of /usr/bin/clang++ to link C++ code. (#1035)
parent 4475ff6b
...@@ -3,34 +3,13 @@ load("@rules_cc//cc:defs.bzl", "cc_library") ...@@ -3,34 +3,13 @@ load("@rules_cc//cc:defs.bzl", "cc_library")
licenses(["notice"]) licenses(["notice"])
config_setting( config_setting(
name = "freebsd",
constraint_values = [
"@platforms//os:freebsd",
],
visibility = [":__subpackages__"],
)
config_setting(
name = "openbsd",
constraint_values = [
"@platforms//os:openbsd",
],
visibility = [":__subpackages__"],
)
config_setting(
name = "windows", name = "windows",
constraint_values = [ values = {
"@platforms//os:windows", "cpu": "x64_windows",
], },
visibility = [":__subpackages__"], visibility = [":__subpackages__"],
) )
BSD_LINKOPTS = [
"-pthread",
"-lm",
]
cc_library( cc_library(
name = "benchmark", name = "benchmark",
srcs = glob( srcs = glob(
...@@ -43,8 +22,6 @@ cc_library( ...@@ -43,8 +22,6 @@ cc_library(
hdrs = ["include/benchmark/benchmark.h"], hdrs = ["include/benchmark/benchmark.h"],
linkopts = select({ linkopts = select({
":windows": ["-DEFAULTLIB:shlwapi.lib"], ":windows": ["-DEFAULTLIB:shlwapi.lib"],
":freebsd": BSD_LINKOPTS,
":openbsd": BSD_LINKOPTS,
"//conditions:default": ["-pthread"], "//conditions:default": ["-pthread"],
}), }),
strip_include_prefix = "include", strip_include_prefix = "include",
......
...@@ -34,9 +34,3 @@ new_local_repository( ...@@ -34,9 +34,3 @@ new_local_repository(
build_file = "@//bindings/python:python_headers.BUILD", build_file = "@//bindings/python:python_headers.BUILD",
path = "/usr/include/python3.6", # May be overwritten by setup.py. path = "/usr/include/python3.6", # May be overwritten by setup.py.
) )
http_archive(
name = "platforms",
strip_prefix = "platforms-master",
urls = ["https://github.com/bazelbuild/platforms/archive/master.zip"],
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment