Skip to content

Commit

Permalink
Remove mingw toolset, use gcc/clang instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarod42 committed Dec 26, 2024
1 parent a05bacb commit 1c6a8cc
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
config: [debug, release]
msystem: [mingw32, mingw64]
depsrc: [none, contrib, system]
cc: [mingw]
cc: [gcc]
include:
- platform: x86
msystem: mingw32
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
- name: Docs check
run: bin/${{ matrix.config }}/premake5.exe docs-check
- name: Upload Artifacts
if: matrix.config == 'release' && matrix.depsrc == 'contrib' && matrix.cc == 'mingw'
if: matrix.config == 'release' && matrix.depsrc == 'contrib' && matrix.cc == 'gcc'
uses: actions/upload-artifact@v4
with:
name: premake-${{ matrix.msystem }}-${{ matrix.platform }}
Expand Down
2 changes: 1 addition & 1 deletion Bootstrap.mak
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ mingw: mingw-clean
mkdir -p build/bootstrap
$(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -DLUA_STATICLIB -I"$(LUA_DIR)" -I"$(LUASHIM_DIR)" $(SRC) -lole32 -lversion
./build/bootstrap/premake_bootstrap embed
./build/bootstrap/premake_bootstrap --arch=$(PLATFORM) --os=windows --to=build/bootstrap --cc=mingw $(PREMAKE_OPTS) gmake2
./build/bootstrap/premake_bootstrap --arch=$(PLATFORM) --os=windows --to=build/bootstrap --cc=gcc $(PREMAKE_OPTS) gmake2
$(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN` config=$(CONFIG)_$(PLATFORM:x86=win32)

macosx: osx
Expand Down
8 changes: 4 additions & 4 deletions premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@
flags { "NoIncrementalLink" }

-- MinGW AR does not handle LTO out of the box and need a plugin to be setup
filter { "system:windows", "configurations:Release", "toolset:not mingw" }
flags { "LinkTimeOptimization" }
filter { "system:windows", "configurations:Release", "toolset:msc" }
flags { "LinkTimeOptimization" }

filter { "system:uwp" }
systemversion "latest:latest"
Expand Down Expand Up @@ -312,8 +312,8 @@
links { "ole32", "ws2_32", "advapi32", "version" }
files { "src/**.rc" }

filter "toolset:mingw"
links { "crypt32", "bcrypt" }
filter { "system:windows", "toolset:not msc" }
links { "crypt32", "bcrypt" }

filter "system:linux or bsd or hurd"
defines { "LUA_USE_POSIX", "LUA_USE_DLOPEN" }
Expand Down
1 change: 0 additions & 1 deletion src/_manifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
"tools/msc.lua",
"tools/snc.lua",
"tools/clang.lua",
"tools/mingw.lua",
"tools/cosmocc.lua",
"tools/emcc.lua",

Expand Down
7 changes: 6 additions & 1 deletion src/_premake_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,7 @@
allowed = {
{ "clang", "Clang (clang)" },
{ "gcc", "GNU GCC (gcc/g++)" },
{ "mingw", "MinGW GCC (gcc/g++)" },
{ "mingw", "MinGW GCC (gcc/g++)" }, -- deprecated
{ "msc-v80", "Microsoft compiler (Visual Studio 2005)" },
{ "msc-v90", "Microsoft compiler (Visual Studio 2008)" },
{ "msc-v100", "Microsoft compiler (Visual Studio 2010)" },
Expand All @@ -1232,6 +1232,11 @@
}
}

if _OPTIONS[cc] == "mingw" then
p.warn("--cc=mingw is deprecated, use --cc=gcc instead")
_OPTIONS[cc] = "gcc"
end

newoption
{
category = "compilers",
Expand Down
8 changes: 0 additions & 8 deletions src/tools/mingw.lua

This file was deleted.

0 comments on commit 1c6a8cc

Please sign in to comment.