Comments (2)
Try replacing it with this version
genrule(
name = "build_tbb",
srcs = glob(["**"]) + [
"@local_config_cc//:toolchain",
],
cmd = """
set -e
WORK_DIR=$$PWD
DEST_DIR=$$PWD/$(@D)
cd $$(dirname $(location :Makefile))
#TBB's build needs some help to figure out what compiler it's using
if $$CXX --version | grep clang &> /dev/null; then
COMPILER_OPT="compiler=clang"
else
COMPILER_OPT="compiler=gcc"
fi
# uses extra_inc=big_iron.inc to specify that static libraries are
# built. See https://software.intel.com/en-us/forums/intel-threading-building-blocks/topic/297792
make tbb_build_prefix="build" \
extra_inc=big_iron.inc \
$$COMPILER_OPT; \
echo cp build/build_release/*.a $$DEST_DIR
cp build/build_release/*.a $$DEST_DIR
cd $$WORK_DIR
""",
outs = [
"libtbb.a",
"libtbbmalloc.a",
]
)
cc_library(
name = "tbb",
hdrs = glob([
"include/serial/**",
"include/tbb/**/**",
]),
srcs = ["libtbb.a"],
includes = ["include"],
visibility = ["//visibility:public"],
)
from satyr.
Thank you very much, it's work!
But I still have a question, Tensorflow-2.3.0 still uses the oldest version of tbb.BUILD, but the bazel version they declared in the .bazelversion file is already 3.1.0. Do you think they need to update tbb.BUILD to the latest one you provide ?
from satyr.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from satyr.