[test] Check platform in exported_symbols_test.

llvm-nm for Linux and macOS needs to be for the right operating system
if the local checkout contains clang toolchains for other operating
systems.

Change-Id: I8de702474a6fa14f06b48e3e60756b3f414272f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342940
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
This commit is contained in:
Jonas Termansen 2023-12-21 14:00:34 +00:00 committed by Commit Queue
parent d71d0f8733
commit 6eaec1ec42

View file

@ -13,10 +13,14 @@ main() {
var nm;
for (var path in [
"buildtools/linux-arm64/clang/bin/llvm-nm",
"buildtools/linux-x64/clang/bin/llvm-nm",
"buildtools/mac-arm64/clang/bin/llvm-nm",
"buildtools/mac-x64/clang/bin/llvm-nm",
if (Platform.isLinux) ...[
"buildtools/linux-arm64/clang/bin/llvm-nm",
"buildtools/linux-x64/clang/bin/llvm-nm",
],
if (Platform.isMacOS) ...[
"buildtools/mac-arm64/clang/bin/llvm-nm",
"buildtools/mac-x64/clang/bin/llvm-nm",
],
]) {
if (new File(path).existsSync()) {
nm = path;