Skip to content

Documentation updated for cpp modules and cross compilation #212

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mccakit
Copy link
Contributor

@mccakit mccakit commented May 5, 2025

  • Before adding new features and new modules, please go to issues to submit the relevant feature description first.
  • Write good commit messages and use the same coding conventions as the rest of the project.
  • Please commit code to dev branch and we will merge into master branch in feature
  • Ensure your edited codes with four spaces instead of TAB.

  • 增加新特性和新模块之前,请先到issues提交相关特性说明,经过讨论评估确认后,再进行相应的代码提交,避免做无用工作。
  • 编写友好可读的提交信息,并使用与工程代码相同的代码规范,代码请用4个空格字符代替tab缩进。
  • 请提交代码到dev分支,如果通过,我们会在特定时间合并到master分支上。
  • 为了规范化提交日志的格式,commit消息,不要用中文,请用英文描述。


```bash
$ xmake update -s github:Arthapz/xmake#cakit-branch
```
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 to better to wait until the patch is merged within xmake codebase

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, in the current state cross compilation and modules don't work on windows, people need to be informed.

I could indicate that this is for windows more sharply if you want

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand, Arthapz has already submitted a PR to fix cross compilation on llvm, it can wait until it is merged. And I doubt that ruki will accept telling users to install a patch from a fork that will quickly fall behind the commit on xmake.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doc can be updated again on 3.0.0, this is just temporary solution. Though other parts of the tutorial are relevant without that patch.

We can just remove the update command from the doc in 3.0.0

$ apt install g++
$ exit
$ docker export deb -o deb.tar
```
Copy link
Member

Choose a reason for hiding this comment

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

remove indent

| [--ldflags](#-ldflags) | Set linker option |
| [--shflags](#-shflags) | Set shared library linker option |
| [--arflags](#-arflags) | Set static library archiver option |
| Configuration Option | Description |
Copy link
Member

Choose a reason for hiding this comment

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

Don't modify irrelevant things

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't explicity try to change those, its just that my markdown editor autoformats

| Value | Description |
| --------- | ------------------------- |
| nocolor | Disable color output |
| color8 | 8-color output support |
Copy link
Member

Choose a reason for hiding this comment

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

and here

1. Install wsl, docker, and rancher desktop

2. Pull the `debian:bookworm` image, update the package list, and install `g++`, which includes the C++ standard library we'll be linking against

Copy link
Member

Choose a reason for hiding this comment

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

I don't think the configuration details of these environments should be documented, which will only mislead users to install wsl, debian and docker.

But many times the user's environment does not require these, just download the corresponding cross-compilation tool chain.

int main()
{
std::cout << "Hi";
}
Copy link
Member

Choose a reason for hiding this comment

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

These are all the basics of xmake. It is impossible to explain them in every example. This is meaningless and very redundant.


1. Install the llvm toolchain, compiling manually is recommended, make sure you have libcxx installed

2. Patch your llvm toolchain,by cloning this [repo](https://github.com/mccakit/xmake_llvm_patch) and putting its contents to C:\llvm\share\libc++\v1\std
Copy link
Member

Choose a reason for hiding this comment

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

Here too, there is too much Windows-specific stuff, and a lot of it is based on third-party repositories.

@mccakit
Copy link
Contributor Author

mccakit commented May 7, 2025

Ping @waruqi

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.

3 participants