+ // If the module is target independent, favor a target which matches the
+ // current build system.
+#if defined(i386) || defined(__i386__) || defined(__x86__)
+ TargetMachineAllocator = allocateX86TargetMachine;
+#elif defined(sparc) || defined(__sparc__) || defined(__sparcv9)
+ TargetMachineAllocator = allocateSparcTargetMachine;
+#elif defined(__POWERPC__) || defined(__ppc__) || defined(__APPLE__)
+ TargetMachineAllocator = allocatePowerPCTargetMachine;
+#else
+ std::cerr << argv[0] << ": module does not specify a target to use. "
+ << "You must use the -march option. If no native target is "
+ << "available, use -march=c to emit C code.\n";
+ return 1;
+#endif