[all-commits] [llvm/llvm-project] 355510: [llvm-rc] Respect the executable specified in the ...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Tue Apr 4 10:56:10 PDT 2023


  Branch: refs/heads/release/16.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 35551022bf04a468ca73adeca7de8a06e89c7cc6
      https://github.com/llvm/llvm-project/commit/35551022bf04a468ca73adeca7de8a06e89c7cc6
  Author: Martin Storsjö <martin at martin.st>
  Date:   2023-04-04 (Tue, 04 Apr 2023)

  Changed paths:
    M llvm/tools/llvm-rc/llvm-rc.cpp

  Log Message:
  -----------
  [llvm-rc] Respect the executable specified in the --preprocessor command

The arguments passed in this option were passed onto the child
process, but we still blindly used the clang binary that we had
found to sys::ExecuteAndWait as the intended executable to run.

If the user hasn't specified any custom --preprocessor command,
Args[0] is equal to the variable Clang.

This doesn't affect any tests, since the tests only print the
arguments it would try to execute (but not the first parameter to
sys::ExecuteAndWait), but there's no testes for executing it
(and validating that it did execute the right thing).

Differential Revision: https://reviews.llvm.org/D146793

(cherry picked from commit d2fa6b694c2052cef1ddd507f6569bc84e3bbe35)


  Commit: b9857e6711a2d352a059d8b58a5d88b2ef16bb15
      https://github.com/llvm/llvm-project/commit/b9857e6711a2d352a059d8b58a5d88b2ef16bb15
  Author: Martin Storsjö <martin at martin.st>
  Date:   2023-04-04 (Tue, 04 Apr 2023)

  Changed paths:
    M llvm/tools/llvm-rc/llvm-rc.cpp

  Log Message:
  -----------
  [llvm-rc] Look for "clang-<major>" when locating a suitable preprocessor

In some cases, there's no adjacent executable named "clang" or
"clang-cl", but one name "clang-<major>". This logic doesn't
cover every possible deployment setup of course, but should
cover more fairly common/reasonable cases.

See
https://github.com/curl/curl-for-win/commit/caaae171ac43af5b883403714dafd42030d8de61#commitcomment-105808524
for discussion about a case where this would have been helpful.

Differential Revision: https://reviews.llvm.org/D146794

(cherry picked from commit 282744a9ce18120dc0a6eceb02693b36980d9498)


  Commit: b27338656d7db712ba6f37295b26f181ab2e043d
      https://github.com/llvm/llvm-project/commit/b27338656d7db712ba6f37295b26f181ab2e043d
  Author: Martin Storsjö <martin at martin.st>
  Date:   2023-04-04 (Tue, 04 Apr 2023)

  Changed paths:
    M llvm/tools/llvm-rc/llvm-rc.cpp

  Log Message:
  -----------
  [llvm-rc] Fix the reference to the option for disabling preprocessing in a message

This was the original option name from the first iteration of the patch
that added the feature, but during review, a different name was suggested
and preferred - but the reference in the helpful message was missed.

Differential Revision: https://reviews.llvm.org/D146796

(cherry picked from commit 014e5c8d39c172a5b4bb1e1c75ced9bcb9ff2115)


Compare: https://github.com/llvm/llvm-project/compare/1fa1bc9c2dff...b27338656d7d


More information about the All-commits mailing list