mirror of
https://github.com/godotengine/godot
synced 2024-09-05 20:49:58 +00:00
fix builds made with Clang on some Linux distros
This is the same as #23542 (Fix binaries incorrectly detected as shared libraries on some linux distros) but for Clang. It should be fine with Clang 4 or higher.
This commit is contained in:
parent
260530f01c
commit
c0fcd55f96
|
@ -1,7 +1,7 @@
|
|||
import os
|
||||
import platform
|
||||
import sys
|
||||
from methods import get_compiler_version, using_gcc
|
||||
from methods import get_compiler_version, using_gcc, using_clang
|
||||
|
||||
|
||||
def is_active():
|
||||
|
@ -184,6 +184,12 @@ def configure(env):
|
|||
if version != None and version[0] >= '6':
|
||||
env.Append(CCFLAGS=['-fpie'])
|
||||
env.Append(LINKFLAGS=['-no-pie'])
|
||||
# Do the same for clang should be fine with Clang 4 and higher
|
||||
if using_clang(env):
|
||||
version = get_compiler_version(env)
|
||||
if version != None and version[0] >= '4':
|
||||
env.Append(CCFLAGS=['-fpie'])
|
||||
env.Append(LINKFLAGS=['-no-pie'])
|
||||
|
||||
## Dependencies
|
||||
|
||||
|
|
Loading…
Reference in a new issue