File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -86,10 +86,13 @@ impl Build {
86
86
config. define ( "LUA_USE_LINUX" , None ) ;
87
87
}
88
88
_ if target. contains ( "apple-darwin" ) => {
89
- config. define ( "LUA_USE_MACOSX" , None ) ;
89
+ match version {
90
+ Lua51 => config. define ( "LUA_USE_LINUX" , None ) ,
91
+ _ => config. define ( "LUA_USE_MACOSX" , None ) ,
92
+ } ;
90
93
}
91
- _ if target. contains ( "emscripten" ) => { }
92
94
_ if target. contains ( "windows" ) => {
95
+ // Defined in Lua >= 5.3
93
96
config. define ( "LUA_USE_WINDOWS" , None ) ;
94
97
}
95
98
_ => panic ! ( "don't know how to build Lua for {}" , target) ,
@@ -108,7 +111,8 @@ impl Build {
108
111
109
112
config
110
113
. include ( & source_dir)
111
- . flag ( "-w" )
114
+ . flag ( "-w" ) // Suppress all warnings
115
+ . flag_if_supported ( "-fno-common" ) // Compile common globals like normal definitions
112
116
. file ( source_dir. join ( "lapi.c" ) )
113
117
. file ( source_dir. join ( "lauxlib.c" ) )
114
118
. file ( source_dir. join ( "lbaselib.c" ) )
You can’t perform that action at this time.
0 commit comments