Skip to content

Restructure bazelrc for reproducible builds - #2492

Merged
GMNGeoffrey merged 2 commits into
iree-org:mainfrom
GMNGeoffrey:bazelrc-restructure
Jul 17, 2020
Merged

GMNGeoffrey merged 2 commits into
iree-org:mainfrom
GMNGeoffrey:bazelrc-restructure

Conversation

@GMNGeoffrey

@GMNGeoffrey GMNGeoffrey commented Jul 12, 2020 •

Copy link
Copy Markdown
Member

Moves the bulk of our bazelrc to a separate directory and then imports
it in the workspace bazelrc. This allows us to remove the workspace rc
from CI build scripts, which means that when running them locally we're
actually running with the same flags for reproducible builds and cache
hits.

@GMNGeoffrey
GMNGeoffrey force-pushed the bazelrc-restructure branch 4 times, most recently from 8dbcc45 to cb995ed Compare July 12, 2020 20:21
@GMNGeoffrey
GMNGeoffrey force-pushed the bazelrc-restructure branch from cb995ed to b30d580 Compare July 14, 2020 19:24
@GMNGeoffrey

Copy link
Copy Markdown
Member Author

Ping @stellaraccident?

@GMNGeoffrey
GMNGeoffrey requested a review from benvanik July 16, 2020 03:18
@GMNGeoffrey
GMNGeoffrey force-pushed the bazelrc-restructure branch from b30d580 to e50a8b2 Compare July 17, 2020 00:26
@GMNGeoffrey
GMNGeoffrey force-pushed the bazelrc-restructure branch from e50a8b2 to a6c60ec Compare July 17, 2020 00:29
@GMNGeoffrey
GMNGeoffrey requested a review from ScottTodd July 17, 2020 00:30
Comment thread .bazelrc Resolved
Comment thread .bazelrc
# Import the main bazelrc config. This is in a separate file so that it's easy
# to turn off all user bazelrc options by specifying
# `--nosystem_rc --nohome_rc --noworkspace_rc --bazelrc=build_tools/bazel/iree.bazelrc`
try-import %workspace%/build_tools/bazel/iree.bazelrc

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm on the fence about this being nested under ./build_tools/bazel/. Each of the other *.bazelrc files is in the root... but we'd like to minimize the number of files in the root if possible. I guess the parallel to https://github.com/google/iree/blob/main/build_tools/cmake/iree_copts.cmake makes this less of an issue?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other bazelrc are added by users though and in the .gitignore. They seem much more akin to user dot files and as untracked files need to be easy to find. My rationale here was that we should stick as much build_tools related stuff under build_tools. Honestly I thought you'd be thrilled that I didn't add another file at root 😛

@GMNGeoffrey
GMNGeoffrey merged commit 6dd8ba4 into iree-org:main Jul 17, 2020
@GMNGeoffrey
GMNGeoffrey deleted the bazelrc-restructure branch July 17, 2020 16:13
@GMNGeoffrey GMNGeoffrey added infrastructure Relating to build systems, CI, or testing bazel labels Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure Relating to build systems, CI, or testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants