File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,10 +86,13 @@ impl Build {
8686 config. define ( "LUA_USE_LINUX" , None ) ;
8787 }
8888 _ 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+ } ;
9093 }
91- _ if target. contains ( "emscripten" ) => { }
9294 _ if target. contains ( "windows" ) => {
95+ // Defined in Lua >= 5.3
9396 config. define ( "LUA_USE_WINDOWS" , None ) ;
9497 }
9598 _ => panic ! ( "don't know how to build Lua for {}" , target) ,
@@ -108,7 +111,8 @@ impl Build {
108111
109112 config
110113 . include ( & source_dir)
111- . flag ( "-w" )
114+ . flag ( "-w" ) // Suppress all warnings
115+ . flag_if_supported ( "-fno-common" ) // Compile common globals like normal definitions
112116 . file ( source_dir. join ( "lapi.c" ) )
113117 . file ( source_dir. join ( "lauxlib.c" ) )
114118 . file ( source_dir. join ( "lbaselib.c" ) )
You can’t perform that action at this time.
0 commit comments