aboutsummaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct5
1 files changed, 3 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct
index 626a302df6..23b9b2f7b4 100644
--- a/SConstruct
+++ b/SConstruct
@@ -196,8 +196,6 @@ if not GetOption("help"):
if env['standalone']:
env.Append(CXXFLAGS = ['-fPIC'])
env.Append(LINKFLAGS = ['-static-libgcc','-static-libstdc++'])
- if env['cppthreads']:
- env.Append(LINKFLAGS = ['-lpthread'])
if env['Werror']:
env.Append(CXXFLAGS = ['-Werror'])
@@ -222,6 +220,9 @@ if env['gles_compute']:
print("Cannot link OpenGLES statically, which is required for bare metal / standalone builds")
Exit(1)
+if env["os"] not in ["android", "bare_metal"] and (env['opencl'] or env['cppthreads']):
+ env.Append(LIBS = ['pthread'])
+
if env['opencl'] or env['gles_compute']:
if env['embed_kernels']:
env.Append(CPPDEFINES = ['EMBEDDED_KERNELS'])