Add "dumpmachine"/"dumpmachinefull" arguments to get the target machine triplet ("dumpmachinefull" for the full MSVC version). #15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Recreated the pull request from #14, as I needed to change the source branch in my fork.
Add two new command-line arguments to get the target machine's triplet, by parsing the command-line output of
cl
:*
dumpmachine
, which is to get the base machine triplet in the format{arch}-pc-windows-msvc
, where{arch}
is the target archetecture. If the target architecture is ARM or X86,{arch}
will be set toarmv7
ori386
, respectfully (since there are many ARM or X86 archetectures).dumpmachine
is similer to that ofgcc
/clang
's command of the same name.*
dumpmachinefull
, which has the same output asdumpmachine
, except it is post-fixed by the full MSVC version being used. In other words, the command-line argument has the following format{arch}-pc-windows-msvc{msvcver}
, where{arch}
is the target archetecture and{msvcver}
is the MSVC version.These arguments precede any other arguments passed to
cccl
, and ifdumpmachine
/dumpmachinefull
is processed, it will print the target triplet and exit succefully (the first ofdumpmachine
ordumpmachinefull
will be processed).