diff options
| author | Anton Yabchinskiy | 2015-07-29 23:01:36 +0300 |
|---|---|---|
| committer | Anton Yabchinskiy | 2015-07-29 23:01:36 +0300 |
| commit | dc8df8a91a995796f0f330bf6bb6b209f6dfce08 (patch) | |
| tree | 46cfe09124703b07860754d6b44e0289422e0573 /platform/x11/detect.py | |
| parent | 16746f157f83d666079ba3266acec13d35b84c3f (diff) | |
| parent | 922356b903061cda7591090bf19e8346c3a78cf5 (diff) | |
| download | godot-dc8df8a91a995796f0f330bf6bb6b209f6dfce08.tar.gz godot-dc8df8a91a995796f0f330bf6bb6b209f6dfce08.tar.zst godot-dc8df8a91a995796f0f330bf6bb6b209f6dfce08.zip | |
Diffstat (limited to 'platform/x11/detect.py')
| -rw-r--r-- | platform/x11/detect.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 185ca04a1..66b4a7ee8 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -53,8 +53,10 @@ def get_opts(): return [ ('use_llvm','Use llvm compiler','no'), ('use_sanitizer','Use llvm compiler sanitize address','no'), + ('use_leak_sanitizer','Use llvm compiler sanitize memory leaks','no'), ('pulseaudio','Detect & Use pulseaudio','yes'), ('new_wm_api', 'Use experimental window management API','no'), + ('debug_release', 'Add debug symbols to release version','no'), ] def get_flags(): @@ -95,6 +97,12 @@ def configure(env): env.Append(LINKFLAGS=['-fsanitize=address']) env.extra_suffix+="s" + if (env["use_leak_sanitizer"]=="yes"): + env.Append(CXXFLAGS=['-fsanitize=address','-fno-omit-frame-pointer']) + env.Append(LINKFLAGS=['-fsanitize=address']) + env.extra_suffix+="s" + + #if (env["tools"]=="no"): # #no tools suffix # env['OBJSUFFIX'] = ".nt"+env['OBJSUFFIX'] @@ -102,8 +110,11 @@ def configure(env): if (env["target"]=="release"): - - env.Append(CCFLAGS=['-O2','-ffast-math','-fomit-frame-pointer']) + + if (env["debug_release"]=="yes"): + env.Append(CCFLAGS=['-g2']) + else: + env.Append(CCFLAGS=['-O3','-ffast-math']) elif (env["target"]=="release_debug"): |
