diff options
author | Spandan Das <spandandas@google.com> | 2023-06-15 01:40:14 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-06-15 01:40:14 +0000 |
commit | 780ccd3956961690db3e36d8fa1ed7649cb0057b (patch) | |
tree | d9fac15bb5a835ae6ba757dc5eaf6ef597ea44cf /tests/legacy/extldflags_rpath/README.md | |
parent | 9803cf8403d7105bddc1d5304d6e694b781a6605 (diff) | |
parent | 96939a977e4ffc1fec4dd7bdca23142216948ab7 (diff) | |
download | bazelbuild-rules_go-780ccd3956961690db3e36d8fa1ed7649cb0057b.tar.gz |
Merge remote-tracking branch 'aosp/upstream-master' into merge_rules_go am: 49dcd02124 am: 711a453236 am: 6cf433ad1b am: de80525bba am: 96939a977e
Original change: https://android-review.googlesource.com/c/platform/external/bazelbuild-rules_go/+/2625353
Change-Id: I32bead2047a7ae618c2688c609a950bc2055edf4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'tests/legacy/extldflags_rpath/README.md')
-rw-r--r-- | tests/legacy/extldflags_rpath/README.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/legacy/extldflags_rpath/README.md b/tests/legacy/extldflags_rpath/README.md new file mode 100644 index 00000000..92de363e --- /dev/null +++ b/tests/legacy/extldflags_rpath/README.md @@ -0,0 +1,15 @@ +This test checks that flags passed to the external linker with -extldflags +through gc_linkopts are correctly combined with other flags passed through +-extldflags. + +`go tool link` only uses the last set of flags passed with -extldflags. If more +than one set of flags is passed, the last set is passed to the external linker, +and the rest are silently ignored. + +`go_binary` and `go_test` should look for -extldflags in gc_linkopts and +combine the flags into a single list passed to `go tool link`. This includes +flags generated by the rules themselves. + +This test checks this behavior by adding extra rpaths, which has an observable +effect on a `go_binary` linked with the external linker. The shell script checks +that these paths are present. |