Skip to content

Commit

Permalink
Add default bazel build flags so things Just Work out of the box. (ir…
Browse files Browse the repository at this point in the history
  • Loading branch information
Stella Laurenzo authored and ScottTodd committed Oct 11, 2019
1 parent bf8833c commit 1178c12
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Required bazel flags for building IREE.

# The user.bazelrc file is not checked in but available for local mods.
try-import user.bazelrc

# Disable warnings we don't care about.
build --copt=-Wno-unused-local-typedef

# C++14 standard version is required.
build --cxxopt=-std=c++14 --host_cxxopt=-std=c++14

# Default to an optimized build.
# Override via: "-c dbg" or --compilation_mode=dbg
build --compilation_mode=opt

# Disable visibility checks (works around some private deps in TensorFlow that
# are being unbundled soon anyway).
build --nocheck_visibility

# Enable some default cpu flags for x86 optimization.
build:x86opt --copt=-mavx2
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ build/

# Bazel artifacts
bazel-*/

# Local-only config options
user.bazelrc

0 comments on commit 1178c12

Please sign in to comment.