rustc: implement pic args

pull/8773/head
Dylan Baker 4 years ago
parent d32fc0563d
commit 6514abf681
  1. 1
      docs/markdown/snippets/rustc-improvements.md
  2. 9
      mesonbuild/compilers/rust.py

@ -3,3 +3,4 @@
- Werror now works, this set's `-D warnings`, which will cause rustc to error
for every warning not explicitly disabled
- warning levels have been implemented
- support for meson's pic has been enabled

@ -187,3 +187,12 @@ class RustCompiler(Compiler):
def get_no_warn_args(self) -> T.List[str]:
return self._WARNING_LEVELS["0"]
def get_pic_args(self) -> T.List[str]:
# This defaults to
return ['-C', 'relocation-model=pic']
def get_pie_args(self) -> T.List[str]:
# Rustc currently has no way to toggle this, it's controlled by whether
# pic is on by rustc
return []

Loading…
Cancel
Save