Skip to content

Commit 359623a

Browse files
authored
Merge pull request #7139 from gadfort/bazel-build-type
bazel: expose compilation mode to build_type to allow to proper splash
2 parents 5319993 + 858947a commit 359623a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ OPENROAD_COPTS = [
9595

9696
OPENROAD_DEFINES = [
9797
"OPENROAD_GIT_DESCRIBE=\\\"bazel-build\\\"",
98-
"BUILD_TYPE=\\\"release\\\"",
98+
"BUILD_TYPE=\\\"$(COMPILATION_MODE)\\\"",
9999
"GPU=false",
100100
"BUILD_PYTHON=false",
101101
"ABC_NAMESPACE=abc",

src/Main.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,11 @@ static void showSplash()
591591
ord::OpenRoad::getGPUCompileOption() ? "+" : "-",
592592
ord::OpenRoad::getGUICompileOption() ? "+" : "-",
593593
ord::OpenRoad::getPythonCompileOption() ? "+" : "-",
594+
#ifdef BAZEL_CURRENT_REPOSITORY
595+
strcasecmp(BUILD_TYPE, "opt") == 0
596+
#else
594597
strcasecmp(BUILD_TYPE, "release") == 0
598+
#endif
595599
? ""
596600
: fmt::format(" : {}", BUILD_TYPE));
597601
logger->report(

0 commit comments

Comments
 (0)