diff --git a/src/compiler/target.c b/src/compiler/target.c index 34ddc96c7..35fb8ed8e 100644 --- a/src/compiler/target.c +++ b/src/compiler/target.c @@ -1273,7 +1273,12 @@ void target_setup(BuildTarget *target) assert(platform_target.pic != PIC_DEFAULT && platform_target.pie != PIE_DEFAULT && "PIC and PIE must have been set."); reloc_mode = LLVMRelocDefault; - if (platform_target.pic != PIC_NONE || platform_target.pie != PIE_NONE) + + if (active_target.type == TARGET_TYPE_EXECUTABLE) + { + platform_target.pic = (PicGeneration)platform_target.pie; + } + if (platform_target.pic != PIC_NONE) { reloc_mode = LLVMRelocPIC; } diff --git a/src/version.h b/src/version.h index fdc9b7d02..5e30b6c21 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define COMPILER_VERSION "A231" \ No newline at end of file +#define COMPILER_VERSION "A232" \ No newline at end of file