[PATCH] D133358: [compiler-rt] [test] Handle missing ld.gold gracefully

Michał Górny via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 6 22:16:31 PDT 2022


mgorny added a comment.

In D133358#3773210 <https://reviews.llvm.org/D133358#3773210>, @MaskRay wrote:

> Python 3.7 can use `subprocess.run` with `capture_output`: https://docs.python.org/3/library/subprocess.html#:~:text=capture_output

Well, if you wanted to avoid calling `subprocess.Popen()`, then you could also use the "older" `subprocess.check_output()`. Not sure if using the "older" API should be a goal though.

> Technically `OSError` can be `FileNotFoundError` if you want to be more specific.

I actually wanted a catch-all here. I don't think we want to crash if `ld.gold` e.g. isn't executable or something like that, we just care that we can't use it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133358



More information about the cfe-commits mailing list