Added ReleaseSmall mode
This commit is contained in:
@@ -81,7 +81,7 @@ static const bool assertions_on = false;
|
||||
#endif
|
||||
|
||||
bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machine_ref, LLVMModuleRef module_ref,
|
||||
const char *filename, ZigLLVM_EmitOutputType output_type, char **error_message, bool is_debug)
|
||||
const char *filename, ZigLLVM_EmitOutputType output_type, char **error_message, bool is_debug, bool is_small)
|
||||
{
|
||||
std::error_code EC;
|
||||
raw_fd_ostream dest(filename, EC, sys::fs::F_None);
|
||||
@@ -100,7 +100,7 @@ bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machine_ref, LLVMM
|
||||
return true;
|
||||
}
|
||||
PMBuilder->OptLevel = target_machine->getOptLevel();
|
||||
PMBuilder->SizeLevel = 0;
|
||||
PMBuilder->SizeLevel = is_small ? 1 : 0;
|
||||
|
||||
PMBuilder->DisableTailCalls = is_debug;
|
||||
PMBuilder->DisableUnitAtATime = is_debug;
|
||||
|
||||
Reference in New Issue
Block a user