This is an archive of the discontinued LLVM Phabricator instance.

[build.py] Allow clang-cl to build files starting with '/U'
ClosedPublic

Authored by xiaobai on Mar 1 2019, 5:14 PM.

Details

Summary

clang-cl tries to match cl's interface, and treats /U as "Removes a
predefined macro" as cl does. When you feed clang-cl a file that begins with
'/U' (e.g. /Users/xiaobai/foo.c), clang-cl will emit a warning and in some cases
an error, like so:

clang-9: warning: '/Users/xiaobai/foo.c' treated as the '/U' option [-Wslash-u-filename]
clang-9: note: Use '--' to treat subsequent arguments as filenames
clang-9: error: no input files

If you're using clang-cl, make sure '--' is passed before the source file.

Diff Detail

Repository
rLLDB LLDB

Event Timeline

xiaobai created this revision.Mar 1 2019, 5:14 PM
labath accepted this revision.Mar 2 2019, 4:01 AM

Seems straight-forward enough.

This revision is now accepted and ready to land.Mar 2 2019, 4:01 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 4 2019, 1:36 PM