Commit 7901986 1 parent 794dea0 commit 7901986 Copy full SHA for 7901986
File tree 4 files changed +12
-10
lines changed
4 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 75
75
76
76
- name : Install scons
77
77
run : |
78
- python -m pip install scons
78
+ python -m pip install scons==4.0.0
79
79
80
80
- name : Setup MinGW for Windows/MinGW build
81
81
if : ${{ matrix.platform == 'windows' && matrix.flags == 'use_mingw=yes' }}
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ import sys
6
6
import subprocess
7
7
from binding_generator import scons_generate_bindings , scons_emit_files
8
8
9
+ EnsureSConsVersion (4 , 0 )
10
+
9
11
10
12
def add_sources (sources , dir , extension ):
11
13
for f in os .listdir (dir ):
Original file line number Diff line number Diff line change 1
1
from SCons .Variables import *
2
+ from SCons .Tool import clang , clangxx
2
3
3
4
4
5
def options (opts ):
@@ -11,8 +12,8 @@ def exists(env):
11
12
12
13
def generate (env ):
13
14
if env ["use_llvm" ]:
14
- base = env . Tool ( "clang" )
15
- base .generate (env )
15
+ clang . generate ( env )
16
+ clangxx .generate (env )
16
17
17
18
env .Append (CCFLAGS = ["-fPIC" , "-Wwrite-strings" ])
18
19
env .Append (LINKFLAGS = ["-Wl,-R,'$$ORIGIN'" ])
Original file line number Diff line number Diff line change 1
1
import sys
2
2
3
3
import my_spawn
4
- from SCons .Tool .MSCommon import msvc_exists
4
+
5
+ from SCons .Tool import msvc , mingw
5
6
from SCons .Variables import *
6
7
7
8
@@ -15,14 +16,13 @@ def exists(env):
15
16
16
17
def generate (env ):
17
18
base = None
18
- if not env ["use_mingw" ] and msvc_exists (env ):
19
- base = env .Tool ("msvc" )
20
- env ["is_msvc" ] = True
19
+ if not env ["use_mingw" ] and msvc .exists (env ):
21
20
if env ["arch" ] == "x86_64" :
22
21
env ["TARGET_ARCH" ] = "amd64"
23
22
elif env ["arch" ] == "x86_32" :
24
23
env ["TARGET_ARCH" ] = "x86"
25
- base .generate (env )
24
+ env ["is_msvc" ] = True
25
+ msvc .generate (env )
26
26
env .Append (CPPDEFINES = ["TYPED_METHOD_BIND" ])
27
27
env .Append (LINKFLAGS = ["/WX" ])
28
28
if env ["target" ] == "debug" :
@@ -32,8 +32,7 @@ def generate(env):
32
32
33
33
elif sys .platform == "win32" or sys .platform == "msys" :
34
34
env ["use_mingw" ] = True
35
- base = env .Tool ("mingw" )
36
- base .generate (env )
35
+ mingw .generate (env )
37
36
# Still need to use C++17.
38
37
env .Append (CCFLAGS = ["-std=c++17" ])
39
38
# Don't want lib prefixes
You can’t perform that action at this time.
0 commit comments