Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove mingw toolset #2396

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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" }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about LLVM with Visual Studio? How should this be handled?

Copy link
Contributor Author

@Jarod42 Jarod42 Dec 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So big build matrix! It seems I would have to add extra CI config.

I honestly don't know

  • if clang under visual should have the link
  • if clang under mingw should have the link.
    It seems to be usage from curl.

I can use filter { "system:windows", "toolset:gcc" } to not change those configs

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like a bigger change like we discussed, does this solve an immediate problem?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussion was adding extra API which would be a big change IMO.
Here I (propose to) remove the strange toolset mingw (which is no even web documented)

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.

Loading