Use probe-stack=inline-asm in LLVM 11+

This commit is contained in:
Erik Desjardins 2020-10-12 22:33:27 -04:00
parent e38fb306b7
commit cd25807223
7 changed files with 63 additions and 11 deletions

View file

@ -114,7 +114,7 @@ pub unsafe fn create_module(
let llmod = llvm::LLVMModuleCreateWithNameInContext(mod_name.as_ptr(), llcx);
let mut target_data_layout = sess.target.data_layout.clone();
if llvm_util::get_major_version() < 10
if llvm_util::get_version() < (10, 0, 0)
&& (sess.target.arch == "x86" || sess.target.arch == "x86_64")
{
target_data_layout = strip_x86_address_spaces(target_data_layout);