diff options
author | 2021-07-23 14:00:23 +0000 | |
---|---|---|
committer | 2021-07-23 14:00:23 +0000 | |
commit | c76c802e6a70d5c1cd0c84349fce7e7dce8634e4 (patch) | |
tree | a07c47c07fed9383ce67bde9d8f67c09977d8f28 /rust/binary_test.go | |
parent | 65eb794a5a8ef23f526dfc025f2901ec2f385aa0 (diff) | |
parent | a2268635f4f05cffb360b6c000b04e76c50c4fed (diff) |
Merge "rust: Add support for bootstrap linker."
Diffstat (limited to 'rust/binary_test.go')
-rw-r--r-- | rust/binary_test.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/rust/binary_test.go b/rust/binary_test.go index 86f50d3e4..968c0c1ff 100644 --- a/rust/binary_test.go +++ b/rust/binary_test.go @@ -114,6 +114,23 @@ func TestBinaryFlags(t *testing.T) { } } +// Test that the bootstrap property sets the appropriate linker +func TestBootstrap(t *testing.T) { + ctx := testRust(t, ` + rust_binary { + name: "foo", + srcs: ["foo.rs"], + bootstrap: true, + }`) + + foo := ctx.ModuleForTests("foo", "android_arm64_armv8-a").Rule("rustc") + + flag := "-Wl,-dynamic-linker,/system/bin/bootstrap/linker64" + if !strings.Contains(foo.Args["linkFlags"], flag) { + t.Errorf("missing link flag to use bootstrap linker, expecting %#v, linkFlags: %#v", flag, foo.Args["linkFlags"]) + } +} + func TestStaticBinaryFlags(t *testing.T) { ctx := testRust(t, ` rust_binary { |