mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-30 23:20:40 +03:00
Fix space handling for different paths.
E.g. on my machine LLVM is installed in folder C:\My Program Files\LLVM. Fixes part of issue #1465. (PR 1466 is required for complete fix.)
This commit is contained in:
parent
1508bafccc
commit
cb0f2e7e6a
4 changed files with 26 additions and 20 deletions
|
@ -201,13 +201,17 @@ int main(int argc, char** argv)
|
|||
return 1;
|
||||
}
|
||||
|
||||
llvm::SmallString<128> file(LLVM_INTRINSIC_TD_PATH);
|
||||
#define STR(x) #x
|
||||
#define XSTR(x) STR(x)
|
||||
llvm::SmallString<128> file(XSTR(LLVM_INTRINSIC_TD_PATH));
|
||||
sys::path::append(file, "llvm");
|
||||
sys::path::append(file, "IR");
|
||||
sys::path::append(file, "Intrinsics.td");
|
||||
|
||||
string iStr = string("-I=") + string(LLVM_INTRINSIC_TD_PATH);
|
||||
string iStr = string("-I=") + string(XSTR(LLVM_INTRINSIC_TD_PATH));
|
||||
string oStr = string("-o=") + argv[1];
|
||||
#undef XSTR
|
||||
#undef STR
|
||||
|
||||
vector<char*> args2(argv, argv + 1);
|
||||
args2.push_back(const_cast<char*>(file.c_str()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue