[PATCH] D133705: [HIP] Fix unbundling archive

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 12 11:57:55 PDT 2022


tra added a comment.

> Archives passed by -l: should not be prefixed with
>  prefix lib and appended with '.a', but still need to be prefixed with
>  paths in -L options.
>  Archives passed as input files should not be prefixed
> or appended with anything.

I'm not sure I understand the requirements. WDYM by "archives passed as input files should not be prefixed or appended by anything" ? E.g. if i do `clang -o foo foo.o mylib.a`, is `mylib.a` prefixed with something or has something appended?

It may help if you could rephrase it in terms of what *does* the code expect. E.g. 'archives with names `lib*.a` passed as direct inputs are not unbundled. All others are treated as potentially containing device code and are unbundled during [linking?]'.

Also, using `lib*.a` as pattern to tell device libraries from the host-ony one will be insufficient. There will be libraries with other extensions (e.g. `.lo` is fairly common) and there will be libraries that do not have `lib` prefix. I.e. nothing stops me from building `mylib.a` and linking with it as in the example above.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133705/new/

https://reviews.llvm.org/D133705



More information about the cfe-commits mailing list