| # Required bazel flags for building IREE. | 
 |  | 
 | # 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 | 
 |  | 
 | # Experimental config for building on Windows via clang-cl. | 
 | # As an aspiration, it may eventually not be required to manually | 
 | # activate this config, but for now, it is a place to store the | 
 | # set of flags and tweaks needed to get the Windows build working. | 
 | # Note that this is intended to work with clang-cl, not the Visual | 
 | # Studio compiler. The following must be performed prior to invoking | 
 | # Bazel: | 
 | #   * Install Visual Studio Build Tools | 
 | #   * export USE_CLANG_CL=1 | 
 | #   * export BAZEL_LLVM=C:/Users/$USER/scoop/apps/llvm/current | 
 | #     (or actual LLVM install location) | 
 | # Then one can build with: | 
 | #   bazel build --config=windows {targets...} | 
 |  | 
 | # Works around __TIME__ __DATE__, etc redefinitions and -std=c++14 | 
 | # warnings. | 
 | build:windows --copt=-Wno-builtin-macro-redefined --host_copt=-Wno-builtin-macro-redefined | 
 | build:windows --copt=-Wno-unknown-argument --host_copt=-Wno-unknown-argument | 
 |  | 
 | # Disables windows headers from pulling in GDI, which does a lot of terrible | 
 | # things (such as defining the ERROR macro, which breaks the world). | 
 | build:windows --copt=-DNOGDI --host_copt=-DNOGDI | 
 |  | 
 | # Enables unix-style runfiles link trees (requires symlink permission). | 
 | # See: https://blogs.windows.com/windowsdeveloper/2016/12/02/symlinks-windows-10/ | 
 | # Generally: Enable Developer Mode in the Developer Settings page of the | 
 | # system settings. | 
 | build:windows --experimental_enable_runfiles | 
 |  | 
 | # The user.bazelrc file is not checked in but available for local mods. | 
 | # Always keep this at the end of the file so that user flags override. | 
 | try-import %workspace%/user.bazelrc | 
 |  |