commit | b53162d82bc1957924337f3384205396be957547 | [log] [tgz] |
---|---|---|
author | Vyacheslav Egorov <vegorov@google.com> | Fri May 24 14:07:05 2019 +0000 |
committer | commit-bot@chromium.org <commit-bot@chromium.org> | Fri May 24 14:07:05 2019 +0000 |
tree | 27e6a63944b65857aafd35f62076532a91e98464 | |
parent | 10692669e3054a0e377d564d079d6fc674f12295 [diff] |
[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] 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 <sstrickl@google.com> Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index baa7bc3..f073da1 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn
@@ -433,8 +433,10 @@ ] } - # 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" ]