Re:Clang accepts MSVC arguments and targets Windows if its b...
by dang on Saturday March 02, 2024 @05:38PM
(#39576406)
Ok, I've restored the URL you submitted (https://github.com/llvm/llvm-project/blob/8ec28af8eaff5acd0d...).
Re:Clang accepts MSVC arguments and targets Windows if its b...
by delta_p_delta_x on Saturday March 02, 2024 @05:55PM
(#39576541)
Cheers!
This very interesting behaviour of clang actually comes from several other places as well.
`IsClangCL()` that returns true if the driver mode is "cl": https://github.com/llvm/llvm-project/blob/8ec28af8eaff5acd0d...
`setDriverMode()` which sets the above: https://github.com/llvm/llvm-project/blob/8ec28af8eaff5acd0d...
This line that actually sets the triplet, the object format, etc: https://github.com/llvm/llvm-project/blob/8ec28af8eaff5acd0d...
Notice how `IsClangCL(getDriverMode(ProgName, ...))` is called in this line: https://github.com/llvm/llvm-project/blob/8ec28af8eaff5acd0d...