[all-commits] [llvm/llvm-project] 3f2371: [clang-cl] [Driver] Fix clang-cl driver supported ...

Max Winkler via All-commits all-commits at lists.llvm.org
Thu Apr 18 16:45:59 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3f2371e1a0dacf78a53d5b57df3cc5f08cddf6a9
      https://github.com/llvm/llvm-project/commit/3f2371e1a0dacf78a53d5b57df3cc5f08cddf6a9
  Author: Max Winkler <max.enrico.winkler at gmail.com>
  Date:   2024-04-18 (Thu, 18 Apr 2024)

  Changed paths:
    M clang/include/clang/Driver/Options.td
    M clang/test/Driver/cl-outputs.c
    M clang/test/Driver/cl-pch.cpp

  Log Message:
  -----------
  [clang-cl] [Driver] Fix clang-cl driver supported colon options (#88216)

Tested locally against msvc 1939.
MSVC supports the colon form of various options that take a path even
though that isn't documented for all options on MSDN.
I added the colon form for all supported msvc options that clang-cl does
not intentionally ignore due to being unsupported.

I also fixed the existing colon options by ensure we use
`JoinedOrSeparate`. `/F[x]` argument must used within the same command
line argument. However, `/F[x]:` arguments are allowed to span a command
line argument. The following is valid `/F[x]: path` which is 2 separate
command line arguments.
You can see this documented here,
https://learn.microsoft.com/en-us/cpp/build/reference/fo-object-file-name?view=msvc-170,
where it says `/Fo:[ ]"pathname"`.
This behaviour works for all colon options that take a path and I tested
it locally against msvc 1939 for all the option changes in this PR.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list