Introduce CompilerConfig.
CompilerConfig defines the "attributes" of a Compiler. It contains
target information, configuration, etc. to setup an instance of
Compiler (more specifically, a instance of LLVM TargetMachine used by
the compiler.)
CompilerConfig together with bcc::init::Initialize() will replace
current Compiler::GlobalInitialization().
diff --git a/Config.h b/Config.h
index c1f4133..3c29c60 100644
--- a/Config.h
+++ b/Config.h
@@ -58,14 +58,19 @@
#endif
#endif
+#define DEFAULT_ARM_TRIPLE_STRING "armv7-none-linux-gnueabi"
+#define DEFAULT_MIPS_TRIPLE_STRING "mipsel-none-linux-gnueabi"
+#define DEFAULT_X86_TRIPLE_STRING "i686-unknown-linux"
+#define DEFAULT_X86_64_TRIPLE_STRING "x86_64-unknown-linux"
+
#if defined(DEFAULT_ARM_CODEGEN)
- #define DEFAULT_TARGET_TRIPLE_STRING "armv7-none-linux-gnueabi"
+ #define DEFAULT_TARGET_TRIPLE_STRING DEFAULT_ARM_TRIPLE_STRING
#elif defined(DEFAULT_MIPS_CODEGEN)
- #define DEFAULT_TARGET_TRIPLE_STRING "mipsel-none-linux-gnueabi"
+ #define DEFAULT_TARGET_TRIPLE_STRING DEFAULT_MIPS_TRIPLE_STRING
#elif defined(DEFAULT_X86_CODEGEN)
- #define DEFAULT_TARGET_TRIPLE_STRING "i686-unknown-linux"
+ #define DEFAULT_TARGET_TRIPLE_STRING DEFAULT_X86_TRIPLE_STRING
#elif defined(DEFAULT_X86_64_CODEGEN)
- #define DEFAULT_TARGET_TRIPLE_STRING "x86_64-unknown-linux"
+ #define DEFAULT_TARGET_TRIPLE_STRING DEFAULT_X86_64_TRIPLE_STRING
#endif
#if (defined(__VFP_FP__) && !defined(__SOFTFP__))