Skip to content

Conversation

@nickclark2016
Copy link
Member

What does this PR do?

Merges toolchainversion functionality with toolset. Deprecates toolchainversion in favor of a single way to specify tooling versions. This also makes it clearer how versions get specified.

-- Old
toolset "gcc"
toolchainversion "4.8"

-- New
toolset "gcc-4.8"

How does this PR change Premake's behavior?

No behavior changes.

Anything else we should know?

Preparation for 5.0

Did you check all the boxes?

  • Focus on a single fix or feature; remove any unrelated formatting or code changes
  • Add unit tests showing fix or feature works; all tests pass
  • Mention any related issues (put closes #XXXX in comment to auto-close issue when PR is merged)
  • Follow our coding conventions
  • Minimize the number of commits
  • Align documentation to your changes

You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to requests like these!

@nickclark2016 nickclark2016 requested a review from a team January 7, 2026 17:19
local value = p.action.current().toolset
tool, version = p.tools.canonical(value)
end
local toolset = p.tools.normalize(cfg.toolset):explode("-", true, 1)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it should be something like

local toolset, toolset_version = p.tools.canonical(cfg.toolset)

Copy link
Member Author

Choose a reason for hiding this comment

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

canonical returns the tool table itself, I need the name.

if version then
m.element("PlatformToolset", nil, version)
m.element("PlatformToolset", nil, ts)
elseif cfg.toolchainversion then
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this part still useful?

Copy link
Member Author

Choose a reason for hiding this comment

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

For Linux, yes. It's tricky to properly deprecate this with a clean mapping of values (it is dependent on the toolset and toolchain version), so we need this code to live until we 100% remove toolchainversion.

@nickclark2016 nickclark2016 force-pushed the normalize-toolchain-versions branch from 9409ea5 to 5ee4404 Compare January 7, 2026 18:29

function suite.linkTimeOptimization_On()
linktimeoptimization('on')
toolset('gcc-remote')
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess the flexibility of this approach is that if there is ever a Remote_GCC_1_1 we can always extend this to gcc-remote-1.1 or whatever

@nickclark2016 nickclark2016 merged commit 5353206 into premake:master Jan 8, 2026
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants