Replace custom platform identifiers with target triples

Open
#1,431 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
cpp
Domain
build-system

Research direction

Start by tracing where hxcpp defines and consumes BINDIR names, then inspect how object output directories are selected. The issue does not name files or tests; first compare the existing platform identifiers with the proposed triples and check the corresponding Neko handling. Done means choosing a canonical triple form, updating both projects, and scheduling the breaking change for a major release.

Written by the indexing model from the issue text.

Description

enhancement

Currently hxcpp uses BINDIR names inherited from neko, e.g.:

  • Windows - windows x86 32-bit
  • Windows64 - windows x86 64-bit
  • WindowsArm64 - windows arm64

These have some problems. With Arm getting more popular as an architecture for general computing, it is getting less obvious that 64 implies x86 64-bit, and definitely that no suffix implies x86 32-bit. The other problem is that it doesn't differentiate between abis, so for example MSVC and mingw binaries (which might be unsafe to mix) end up in the same directory.

This would be solved by target triples, e.g.:

  • i386-pc-windows-msvc
  • x86_64-pc-windows-msvc
  • aarch64-pc-windows-msvc

They might also be useful when picking names for object output directories, as those are a bit of a mess too now.

However, we would have to pick some canonical form of the triples because different toolchains sometimes chose to lay them out different (e.g. -pc might be omitted, or sometimes architectures might have different names, like i686 vs i386).

This would be a breaking change so it would have to be in a major release. Some corresponding changes would probably have to be made in neko too.

Dominant language
C++
Stars
330
Forks
237
Avg merge
1d 3h
Merged PRs (30d)
20

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from HaxeFoundation/hxcpp

All issues in HaxeFoundation/hxcpp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.