github.com/0xKiwi/rules_go@v0.24.3/tests/legacy/extldflags_rpath/README.md (about)

     1  This test checks that flags passed to the external linker with -extldflags
     2  through gc_linkopts are correctly combined with other flags passed through
     3  -extldflags.
     4  
     5  `go tool link` only uses the last set of flags passed with -extldflags. If more
     6  than one set of flags is passed, the last set is passed to the external linker,
     7  and the rest are silently ignored.
     8  
     9  `go_binary` and `go_test` should look for -extldflags in gc_linkopts and
    10  combine the flags into a single list passed to `go tool link`. This includes
    11  flags generated by the rules themselves.
    12  
    13  This test checks this behavior by adding extra rpaths, which has an observable
    14  effect on a `go_binary` linked with the external linker. The shell script checks
    15  that these paths are present.