premake / premake/premake-core

Usage with "Clang for Windows"

Open
#1,016 12 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
3.6k
Forks
654
Avg merge
1d 1h
Merged PRs (30d)
13

Description

NOTE: For the purposes of this discussion I'm not talking about using Clang toolset in MSVC.

Is Clang properly supported with Premake on Windows without using clang-cl?

In the 5.0.0 and the latest release and probably earlier versions the regular clang executable (taking GCC flags) works in Windows and produces valid MSVC compatible binaries.

According to this blog post in order for clang to produce MSVC compatible binaries a specific triple must be sent as the target platform:

Alternatively, if you have a cross-platform project and want to use gcc-style flags for your Windows build, you can pass a Windows triple (e.g. --target=x86_64-windows-msvc) to regular Clang, and it will produce MSVC-ABI-compatible output.

http://blog.llvm.org/2018/03/clang-is-now-used-to-build-chrome-for.html

Because of the wording of the blog around that paragraph it is confusing if the target triple is required when building on Windows or if it is only required when on a different platform and performing a cross compilation.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the regular clang executable workflow on Windows described in the issue, with and without the x86_64-windows-msvc target triple. Compare the generated behavior with the expected MSVC-compatible output; done means the support question is resolved and any required Premake change is covered by a regression test or documented behavior.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.