mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-08 03:46:02 +03:00
remove isRuntimeCompileEnabled() function
This commit is contained in:
parent
9633eca239
commit
afae2f296b
5 changed files with 7 additions and 8 deletions
|
@ -124,9 +124,8 @@ extern cl::opt<std::string> dcomputeFilePrefix;
|
|||
|
||||
#if defined(LDC_RUNTIME_COMPILE)
|
||||
extern cl::opt<bool> enableRuntimeCompile;
|
||||
inline bool isRuntimeCompileEnabled() { return enableRuntimeCompile; }
|
||||
#else
|
||||
inline bool isRuntimeCompileEnabled() { return false; }
|
||||
constexpr bool enableRuntimeCompile = false;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -341,7 +341,7 @@ void ArgsBuilder::build(llvm::StringRef outputPath,
|
|||
args.push_back("-lldc-profile-rt");
|
||||
}
|
||||
|
||||
if (opts::isRuntimeCompileEnabled()) {
|
||||
if (opts::enableRuntimeCompile) {
|
||||
args.push_back("-lldc-jit-rt");
|
||||
args.push_back("-lldc-jit");
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ int linkObjToBinaryMSVC(llvm::StringRef outputPath, bool useInternalLinker,
|
|||
args.push_back("ws2_32.lib");
|
||||
}
|
||||
|
||||
if (opts::isRuntimeCompileEnabled()) {
|
||||
if (opts::enableRuntimeCompile) {
|
||||
args.push_back("ldc-jit-rt.lib");
|
||||
args.push_back("ldc-jit.lib");
|
||||
}
|
||||
|
|
|
@ -920,7 +920,7 @@ void registerPredefinedVersions() {
|
|||
|
||||
// `D_ObjectiveC` is added by the ddmd.objc.Supported ctor
|
||||
|
||||
if (opts::isRuntimeCompileEnabled()) {
|
||||
if (opts::enableRuntimeCompile) {
|
||||
VersionCondition::addPredefinedGlobalIdent("LDC_RuntimeCompilation");
|
||||
}
|
||||
|
||||
|
|
|
@ -648,7 +648,7 @@ void declareRuntimeCompiledFunction(IRState *irs, IrFunction *func) {
|
|||
assert(nullptr != irs);
|
||||
assert(nullptr != func);
|
||||
assert(nullptr != func->getLLVMFunc());
|
||||
if (!opts::isRuntimeCompileEnabled()) {
|
||||
if (!opts::enableRuntimeCompile) {
|
||||
return;
|
||||
}
|
||||
auto srcFunc = func->getLLVMFunc();
|
||||
|
@ -665,7 +665,7 @@ void defineRuntimeCompiledFunction(IRState *irs, IrFunction *func)
|
|||
assert(nullptr != func);
|
||||
assert(nullptr != func->getLLVMFunc());
|
||||
assert(nullptr != func->rtCompileFunc);
|
||||
if (!opts::isRuntimeCompileEnabled()) {
|
||||
if (!opts::enableRuntimeCompile) {
|
||||
return;
|
||||
}
|
||||
auto srcFunc = func->getLLVMFunc();
|
||||
|
@ -688,7 +688,7 @@ void addRuntimeCompiledVar(IRState *irs, IrGlobal *var) {
|
|||
assert(nullptr != var);
|
||||
assert(nullptr != var->value);
|
||||
assert(nullptr != var->V);
|
||||
if (!opts::isRuntimeCompileEnabled()) {
|
||||
if (!opts::enableRuntimeCompile) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue