Disable PIC on Windows
This commit is contained in:
2
ispc.cpp
2
ispc.cpp
@@ -241,7 +241,9 @@ Target::GetTargetMachine() const {
|
|||||||
std::string featuresString = cpu + std::string(",") + attributes;
|
std::string featuresString = cpu + std::string(",") + attributes;
|
||||||
llvm::TargetMachine *targetMachine =
|
llvm::TargetMachine *targetMachine =
|
||||||
target->createTargetMachine(triple, featuresString);
|
target->createTargetMachine(triple, featuresString);
|
||||||
|
#ifndef ISPC_IS_WINDOWS
|
||||||
targetMachine->setRelocationModel(relocModel);
|
targetMachine->setRelocationModel(relocModel);
|
||||||
|
#endif // !ISPC_IS_WINDOWS
|
||||||
#endif
|
#endif
|
||||||
assert(targetMachine != NULL);
|
assert(targetMachine != NULL);
|
||||||
|
|
||||||
|
|||||||
4
main.cpp
4
main.cpp
@@ -96,7 +96,9 @@ static void usage(int ret) {
|
|||||||
printf(" disable-uniform-memory-optimizations\tDisable uniform-based coherent memory access\n");
|
printf(" disable-uniform-memory-optimizations\tDisable uniform-based coherent memory access\n");
|
||||||
printf(" disable-masked-store-optimizations\tDisable lowering to regular stores when possible\n");
|
printf(" disable-masked-store-optimizations\tDisable lowering to regular stores when possible\n");
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef ISPC_IS_WINDOWS
|
||||||
printf(" [--pic]\t\t\t\tGenerate position-independent code\n");
|
printf(" [--pic]\t\t\t\tGenerate position-independent code\n");
|
||||||
|
#endif // !ISPC_IS_WINDOWS
|
||||||
printf(" [--target=<isa>]\t\t\tSelect target ISA. <isa>={%s}\n", Target::SupportedTargetISAs());
|
printf(" [--target=<isa>]\t\t\tSelect target ISA. <isa>={%s}\n", Target::SupportedTargetISAs());
|
||||||
printf(" [--version]\t\t\t\tPrint ispc version\n");
|
printf(" [--version]\t\t\t\tPrint ispc version\n");
|
||||||
printf(" [--woff]\t\t\t\tDisable warnings\n");
|
printf(" [--woff]\t\t\t\tDisable warnings\n");
|
||||||
@@ -302,8 +304,10 @@ int main(int Argc, char *Argv[]) {
|
|||||||
g->includeStdlib = false;
|
g->includeStdlib = false;
|
||||||
else if (!strcmp(argv[i], "--nocpp"))
|
else if (!strcmp(argv[i], "--nocpp"))
|
||||||
g->runCPP = false;
|
g->runCPP = false;
|
||||||
|
#ifndef ISPC_IS_WINDOWS
|
||||||
else if (!strcmp(argv[i], "--pic"))
|
else if (!strcmp(argv[i], "--pic"))
|
||||||
generatePIC = true;
|
generatePIC = true;
|
||||||
|
#endif // !ISPC_IS_WINDOWS
|
||||||
else if (!strcmp(argv[i], "-v") || !strcmp(argv[i], "--version")) {
|
else if (!strcmp(argv[i], "-v") || !strcmp(argv[i], "--version")) {
|
||||||
printf("Intel(r) SPMD Program Compiler (ispc) build %s (%s)\n",
|
printf("Intel(r) SPMD Program Compiler (ispc) build %s (%s)\n",
|
||||||
BUILD_DATE, BUILD_VERSION);
|
BUILD_DATE, BUILD_VERSION);
|
||||||
|
|||||||
Reference in New Issue
Block a user