This commit is contained in:
Ivan 2017-11-09 21:44:25 +03:00
parent 876d37f61a
commit e53f7f4be1
6 changed files with 10 additions and 10 deletions

View file

@ -386,11 +386,11 @@ append("-DLDC_WITH_PGO" LDC_CXXFLAGS)
# Enable Runtime compilation if supported for this platform and LLVM version. # Enable Runtime compilation if supported for this platform and LLVM version.
# LLVM >= 3.9 is required # LLVM >= 3.9 is required
# #
set(LDC_RUNTIME_COMPILE False) # must be a valid Python boolean constant (case sensitive) set(LDC_DYNAMIC_COMPILE False) # must be a valid Python boolean constant (case sensitive)
if (NOT (LDC_LLVM_VER LESS 400)) if (NOT (LDC_LLVM_VER LESS 400))
message(STATUS "Building LDC with runtime compilation support") message(STATUS "Building LDC with runtime compilation support")
add_definitions(-DLDC_RUNTIME_COMPILE) add_definitions(-DLDC_DYNAMIC_COMPILE)
set(LDC_RUNTIME_COMPILE True) set(LDC_DYNAMIC_COMPILE True)
endif() endif()
# #

View file

@ -456,7 +456,7 @@ cl::opt<std::string>
cl::value_desc("prefix")); cl::value_desc("prefix"));
#endif #endif
#if defined(LDC_RUNTIME_COMPILE) #if defined(LDC_DYNAMIC_COMPILE)
cl::opt<bool> enableDynamicCompile( cl::opt<bool> enableDynamicCompile(
"enable-dynamic-compile", "enable-dynamic-compile",
cl::desc("Enable dynamic compilation"), cl::desc("Enable dynamic compilation"),

View file

@ -122,7 +122,7 @@ extern cl::list<std::string> dcomputeTargets;
extern cl::opt<std::string> dcomputeFilePrefix; extern cl::opt<std::string> dcomputeFilePrefix;
#endif #endif
#if defined(LDC_RUNTIME_COMPILE) #if defined(LDC_DYNAMIC_COMPILE)
extern cl::opt<bool> enableDynamicCompile; extern cl::opt<bool> enableDynamicCompile;
extern cl::opt<bool> dynamicCompileTlsWorkaround; extern cl::opt<bool> dynamicCompileTlsWorkaround;
#else #else

View file

@ -9,7 +9,7 @@
#include "gen/runtimecompile.h" #include "gen/runtimecompile.h"
#if defined(LDC_RUNTIME_COMPILE) #if defined(LDC_DYNAMIC_COMPILE)
#include <unordered_map> #include <unordered_map>
#include <unordered_set> #include <unordered_set>
@ -805,7 +805,7 @@ void addRuntimeCompiledVar(IRState *irs, IrGlobal *var) {
irs->dynamicCompiledVars.insert(var); irs->dynamicCompiledVars.insert(var);
} }
#else // defined(LDC_RUNTIME_COMPILE) #else // defined(LDC_DYNAMIC_COMPILE)
void generateBitcodeForRuntimeCompile(IRState *) { void generateBitcodeForRuntimeCompile(IRState *) {
// nothing // nothing

View file

@ -1,4 +1,4 @@
if(LDC_RUNTIME_COMPILE) if(LDC_DYNAMIC_COMPILE)
file(GLOB LDC_JITRT_D ${JITRT_DIR}/d/ldc/*.d) file(GLOB LDC_JITRT_D ${JITRT_DIR}/d/ldc/*.d)
# Choose the correct subfolder depending on the LLVM version # Choose the correct subfolder depending on the LLVM version

View file

@ -21,7 +21,7 @@ config.llvm_version = @LDC_LLVM_VER@
config.llvm_targetsstr = "@LLVM_TARGETS_TO_BUILD@" config.llvm_targetsstr = "@LLVM_TARGETS_TO_BUILD@"
config.default_target_bits = @DEFAULT_TARGET_BITS@ config.default_target_bits = @DEFAULT_TARGET_BITS@
config.with_PGO = @LDC_WITH_PGO@ config.with_PGO = @LDC_WITH_PGO@
config.runtime_compile = @LDC_RUNTIME_COMPILE@ config.dynamic_compile = @LDC_DYNAMIC_COMPILE@
config.name = 'LDC' config.name = 'LDC'
@ -48,7 +48,7 @@ if not config.with_PGO:
config.excludes.append('PGO') config.excludes.append('PGO')
# Exclude runtime compilation tests when it's disabled # Exclude runtime compilation tests when it's disabled
if not config.runtime_compile: if not config.dynamic_compile:
config.excludes.append('dynamiccompile') config.excludes.append('dynamiccompile')
# Explicit forwarding of environment variables # Explicit forwarding of environment variables