@@ -94,6 +94,9 @@ env.Prepend(CXXFLAGS=[
9494])
9595env .Append (LINKFLAGS = ["-arch" , env ['arch' ], '-isysroot' , sdk_path , '-F' + sdk_path ])
9696
97+ if env ['arch' ] == 'armv7' :
98+ env .Prepend (CXXFLAGS = ['-fno-aligned-allocation' ])
99+
97100if env ['version' ] == '3.2' :
98101 env .Prepend (CFLAGS = ['-std=gnu11' ])
99102 env .Prepend (CXXFLAGS = ['-DGLES_ENABLED' , '-std=gnu++14' ])
@@ -106,16 +109,22 @@ if env['version'] == '3.2':
106109 '-DPTRCALL_ENABLED' ,
107110 ])
108111 elif env ['target' ] == 'release_debug' :
109- env .Prepend (CXXFLAGS = ['-O2' , '-ftree-vectorize' , '-fomit-frame-pointer' ,
112+ env .Prepend (CXXFLAGS = ['-O2' , '-ftree-vectorize' ,
110113 '-DNDEBUG' , '-DNS_BLOCK_ASSERTIONS=1' , '-DDEBUG_ENABLED' ,
111114 '-DPTRCALL_ENABLED' ,
112115 ])
116+
117+ if env ['arch' ] != 'armv7' :
118+ env .Prepend (CXXFLAGS = ['-fomit-frame-pointer' ])
113119 else :
114120 env .Prepend (CXXFLAGS = [
115- '-O2' , '-ftree-vectorize' , '-fomit-frame-pointer' ,
121+ '-O2' , '-ftree-vectorize' ,
116122 '-DNDEBUG' , '-DNS_BLOCK_ASSERTIONS=1' ,
117123 '-DPTRCALL_ENABLED' ,
118124 ])
125+
126+ if env ['arch' ] != 'armv7' :
127+ env .Prepend (CXXFLAGS = ['-fomit-frame-pointer' ])
119128elif env ['version' ] == '4.0' :
120129 env .Prepend (CFLAGS = ['-std=gnu11' ])
121130 env .Prepend (CXXFLAGS = ['-DVULKAN_ENABLED' , '-std=gnu++17' ])
@@ -128,38 +137,44 @@ elif env['version'] == '4.0':
128137 ])
129138 elif env ['target' ] == 'release_debug' :
130139 env .Prepend (CXXFLAGS = [
131- '-O2' , '-ftree-vectorize' , '-fomit-frame-pointer' ,
140+ '-O2' , '-ftree-vectorize' ,
132141 '-DNDEBUG' , '-DNS_BLOCK_ASSERTIONS=1' , '-DDEBUG_ENABLED' ,
133142 ])
143+
144+ if env ['arch' ] != 'armv7' :
145+ env .Prepend (CXXFLAGS = ['-fomit-frame-pointer' ])
134146 else :
135147 env .Prepend (CXXFLAGS = [
136- '-O2' , '-ftree-vectorize' , '-fomit-frame-pointer' ,
148+ '-O2' , '-ftree-vectorize' ,
137149 '-DNDEBUG' , '-DNS_BLOCK_ASSERTIONS=1' ,
138150 ])
151+
152+ if env ['arch' ] != 'armv7' :
153+ env .Prepend (CXXFLAGS = ['-fomit-frame-pointer' ])
139154else :
140155 print ("No valid version to set flags for." )
141156 quit ();
142157
143158# Adding header files
144159env .Append (CPPPATH = [
145160 '.' ,
146- 'godot_headers ' ,
147- 'godot_headers /main' ,
148- 'godot_headers /core' ,
149- 'godot_headers /core/os' ,
150- 'godot_headers /core/platform' ,
151- 'godot_headers /platform/iphone' ,
152- 'godot_headers /modules' ,
153- 'godot_headers /scene' ,
154- 'godot_headers /servers' ,
155- 'godot_headers /drivers' ,
156- 'godot_headers /thirdparty' ,
161+ 'godot ' ,
162+ 'godot /main' ,
163+ 'godot /core' ,
164+ 'godot /core/os' ,
165+ 'godot /core/platform' ,
166+ 'godot /platform/iphone' ,
167+ 'godot /modules' ,
168+ 'godot /scene' ,
169+ 'godot /servers' ,
170+ 'godot /drivers' ,
171+ 'godot /thirdparty' ,
157172])
158173
159174# tweak this if you want to use different folders, or more folders, to store your source code in.
160- sources = Glob (env ['plugin' ] + '/*.cpp' )
161- sources .append (Glob (env ['plugin' ] + '/*.mm' ))
162- sources .append (Glob (env ['plugin' ] + '/*.m' ))
175+ sources = Glob ('plugins/' + env ['plugin' ] + '/*.cpp' )
176+ sources .append (Glob ('plugins/' + env ['plugin' ] + '/*.mm' ))
177+ sources .append (Glob ('plugins/' + env ['plugin' ] + '/*.m' ))
163178
164179# lib<plugin>.<arch>-<simulator|iphone>.<release|debug|release_debug>.a
165180library_platform = env ["arch" ] + "-" + ("simulator" if env ["simulator" ] else "iphone" )
0 commit comments