aboutsummaryrefslogtreecommitdiff
path: root/src/zig_llvm.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-11-22 12:39:44 -0700
committerAndrew Kelley <andrew@ziglang.org>2020-11-22 12:39:44 -0700
commit55ab50efbd5e475442ac9c3b841e461ee331ee2c (patch)
treeb105283bee898de86fbaa03491bcaa513e64a51c /src/zig_llvm.cpp
parent2fbe9519acec0d7b9c9dcc41a877fec912337124 (diff)
parent333eec557f8ab89d74e9d66e55eea037ba0433cb (diff)
downloadzig-55ab50efbd5e475442ac9c3b841e461ee331ee2c.tar.gz
zig-55ab50efbd5e475442ac9c3b841e461ee331ee2c.zip
Merge branch 'piepiepie' of https://github.com/LemonBoy/zig into pie
Conflicts: lib/std/dynamic_library.zig (fixed in this commit) src/all_types.hpp src/codegen.cpp src/link.cpp src/main.cpp Will manually apply the diffs to these deleted files to the new zig code in a followup commit.
Diffstat (limited to 'src/zig_llvm.cpp')
-rw-r--r--src/zig_llvm.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/zig_llvm.cpp b/src/zig_llvm.cpp
index cc02c4c028..d8eeaf7fae 100644
--- a/src/zig_llvm.cpp
+++ b/src/zig_llvm.cpp
@@ -855,6 +855,14 @@ void ZigLLVMAddModuleCodeViewFlag(LLVMModuleRef module) {
unwrap(module)->addModuleFlag(Module::Warning, "CodeView", 1);
}
+void ZigLLVMSetModulePICLevel(LLVMModuleRef module) {
+ unwrap(module)->setPICLevel(PICLevel::Level::BigPIC);
+}
+
+void ZigLLVMSetModulePIELevel(LLVMModuleRef module) {
+ unwrap(module)->setPIELevel(PIELevel::Level::Large);
+}
+
static AtomicOrdering mapFromLLVMOrdering(LLVMAtomicOrdering Ordering) {
switch (Ordering) {
case LLVMAtomicOrderingNotAtomic: return AtomicOrdering::NotAtomic;