Skip to content

Commit

Permalink
Fix issue related to empty bazel.rc file.
Browse files Browse the repository at this point in the history
Change: 154840138
  • Loading branch information
tensorflower-gardener committed May 2, 2017
1 parent e8eafd9 commit aaa5600
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ node_modules
/.tf_configure.bazelrc
/bazel-*
/third_party/py/numpy/numpy_include
/tools/bazel.rc
/tools/python_bin_path.sh
/tools/git/gen
/util/python/python_include
Expand Down
3 changes: 1 addition & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,8 @@ if [[ "$TF_NEED_VERBS" == "1" ]]; then
fi

# Append CC optimization flags to bazel.rc
echo >> tools/bazel.rc
for opt in $CC_OPT_FLAGS; do
echo "build:opt --cxxopt=$opt --copt=$opt" >> tools/bazel.rc
write_to_bazelrc 'build:opt --cxxopt=$opt --copt=$opt'
done

# Run the gen_git_source to create links where bazel can track dependencies for
Expand Down
30 changes: 30 additions & 0 deletions tools/bazel.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
build:cuda --crosstool_top=@local_config_cuda//crosstool:toolchain
build:cuda --define=using_cuda=true --define=using_cuda_nvcc=true

build:cuda_clang --crosstool_top=@local_config_cuda//crosstool:toolchain
build:cuda_clang --define=using_cuda=true --define=using_cuda_clang=true

build:win-cuda --define=using_cuda=true --define=using_cuda_nvcc=true

build:mkl --define=using_mkl=true

build:sycl --crosstool_top=@local_config_sycl//crosstool:toolchain
build:sycl --define=using_sycl=true

build:sycl_asan --crosstool_top=@local_config_sycl//crosstool:toolchain
build:sycl_asan --define=using_sycl=true --copt -fno-omit-frame-pointer --copt -fsanitize-coverage=3 --copt -DGPR_NO_DIRECT_SYSCALLS --linkopt -fPIC --linkopt -fsanitize=address

build --define=use_fast_cpp_protos=true
build --define=allow_oversize_protos=true

build --spawn_strategy=standalone
test --spawn_strategy=standalone
run --spawn_strategy=standalone

build --genrule_strategy=standalone
test --genrule_strategy=standalone
run --genrule_strategy=standalone

build -c opt
test -c opt
run -c opt

0 comments on commit aaa5600

Please sign in to comment.