mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
make -filetype=obj default to emitting its output to foo.obj
when on windows instead of foo.o. Patch by Nathan Jeffords! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103150 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7539584781
commit
5758d4ce46
@ -120,6 +120,7 @@ GetFileNameRoot(const std::string &InputFilename) {
|
||||
}
|
||||
|
||||
static formatted_raw_ostream *GetOutputStream(const char *TargetName,
|
||||
Triple::OSType OS,
|
||||
const char *ProgName) {
|
||||
if (OutputFilename != "") {
|
||||
if (OutputFilename == "-")
|
||||
@ -166,6 +167,9 @@ static formatted_raw_ostream *GetOutputStream(const char *TargetName,
|
||||
OutputFilename += ".s";
|
||||
break;
|
||||
case TargetMachine::CGFT_ObjectFile:
|
||||
if (OS == Triple::Win32)
|
||||
OutputFilename += ".obj";
|
||||
else
|
||||
OutputFilename += ".o";
|
||||
Binary = true;
|
||||
break;
|
||||
@ -284,7 +288,8 @@ int main(int argc, char **argv) {
|
||||
TargetMachine &Target = *target.get();
|
||||
|
||||
// Figure out where we are going to send the output...
|
||||
formatted_raw_ostream *Out = GetOutputStream(TheTarget->getName(), argv[0]);
|
||||
formatted_raw_ostream *Out = GetOutputStream(TheTarget->getName(),
|
||||
TheTriple.getOS(), argv[0]);
|
||||
if (Out == 0) return 1;
|
||||
|
||||
CodeGenOpt::Level OLvl = CodeGenOpt::Default;
|
||||
|
Loading…
Reference in New Issue
Block a user