[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 https://github.com/dart-lang/sdk/issues/35631

Note: this follows what newer versions of build configs do. See for
example one used in Flutter build root[1]

[1] 224ebe0ada/build/config/BUILD.gn (L121)

Change-Id: I405c820db4363a59230d7ba4f93d760a8cbbabc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103627
Reviewed-by: Teagan Strickland <sstrickl@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
This commit is contained in:
Vyacheslav Egorov 2019-05-24 14:07:05 +00:00 committed by commit-bot@chromium.org
parent 10692669e3
commit b53162d82b

View file

@ -433,8 +433,10 @@ config("runtime_library") {
]
}
# Android standard library setup.
if (is_android) {
if (is_linux) {
libs += [ "dl" ]
} else if (is_android) {
# Android standard library setup.
if (is_clang) {
# Work around incompatibilities between bionic and clang headers.
defines += [ "__compiler_offsetof=__builtin_offsetof" ]