Skip to content

build_openroad: stop passing -lto to OpenROAD's Build.sh - #4587

Merged
maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:build-openroad-drop-lto
Sep 30, 2026
Merged

maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:build-openroad-drop-lto

Conversation

@maliberty

Copy link
Copy Markdown
Member

OpenROAD's Build.sh always builds with Bazel --config=release, which already includes --config=opt (-O3 and ThinLTO). Passing -lto added --config=opt a second time, so Bazel expanded opt twice (WARNING: The following configs were expanded more than once: [opt]) and every compile got -O3 twice.

That changes every CppCompile action key, so the "Make Docker image w/binaries" stage never hit the remote cache that OpenROAD CI fills with --config=ci and rebuilt all ~18k actions from scratch.

bazel aquery action keys for src/odb/src/db/tmg_conn.cpp:

flags action key -O3 count
--config=ci d31d96fc… 1
--config=release --//:platform=gui d31d96fc… 1
--config=release --config=opt (with -lto) d1256c59… 2

The pinned OpenROAD already has build:release --config=opt, so the binary is still built with -O3 and ThinLTO. The companion OpenROAD change (The-OpenROAD-Project-private/OpenROAD#3844) makes -lto a no-op in Build.sh.

Build.sh always uses --config=release, which already includes
--config=opt. -lto added --config=opt a second time, so every compile
got -O3 twice, which changed every action key. The Docker builder
stage then missed the remote cache that OpenROAD CI fills with
--config=ci and rebuilt OpenROAD from scratch.

The binary is unchanged: it is still built with -O3 and ThinLTO.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
@maliberty maliberty self-assigned this Sep 30, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the build_openroad.sh script by removing the -lto flag from OPENROAD_APP_ARGS and updating the comments to clarify that Build.sh now always builds with Bazel --config=release (which includes -O3 and ThinLTO). There are no review comments, so I have no additional feedback to provide.

@openroad-ci

Copy link
Copy Markdown
Member

🔍 QoR check

Metrics reflect the PR merge build — i.e. what will land on the target branch.

Commit b111f88 · Jenkins build #1 · Baseline: build · View build on dashboard

62 design(s) checked — 0 with regression(s), 0 without a comparable baseline.

@maliberty
maliberty merged commit 416752d into The-OpenROAD-Project:master Sep 30, 2026
12 checks passed
@maliberty
maliberty deleted the build-openroad-drop-lto branch September 30, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants