News for hackers. Stuff that matters.
Re:Clang accepts MSVC arguments and targets Windows if its b... by delta_p_delta_x on Saturday March 02, 2024 @04:30PM (#39575949)
Thanks! I'm positive I submitted the URL with the line number, but it's possible HN removed it for spam/remote execution filtering or something.

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...

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!