Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit b53162d

Browse files
mralephcommit-bot@chromium.org
authored andcommitted
[build] Link with dl library on linux by default.
Otherwise executables simply does not link because C++ std lib we are using has dependency on dl (through libunwind). Fixes dart-lang/sdk#35631 Note: this follows what newer versions of build configs do. See for example one used in Flutter build root[1] [1] https://github.com/flutter/buildroot/blob/224ebe0adaaf8463cc505a42c0e5eac870b2896e/build/config/BUILD.gn#L121 Change-Id: I405c820db4363a59230d7ba4f93d760a8cbbabc3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103627 Reviewed-by: Teagan Strickland <[email protected]> Commit-Queue: Vyacheslav Egorov <[email protected]>
1 parent 1069266 commit b53162d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

build/config/compiler/BUILD.gn

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,10 @@ config("runtime_library") {
433433
]
434434
}
435435

436-
# Android standard library setup.
437-
if (is_android) {
436+
if (is_linux) {
437+
libs += [ "dl" ]
438+
} else if (is_android) {
439+
# Android standard library setup.
438440
if (is_clang) {
439441
# Work around incompatibilities between bionic and clang headers.
440442
defines += [ "__compiler_offsetof=__builtin_offsetof" ]

0 commit comments

Comments
 (0)