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

Include tools needed by rust-mos build #275

Closed
mrk-its opened this issue Dec 29, 2022 · 4 comments
Closed

Include tools needed by rust-mos build #275

mrk-its opened this issue Dec 29, 2022 · 4 comments
Labels
enhancement New feature or request p1

Comments

@mrk-its
Copy link
Contributor

mrk-its commented Dec 29, 2022

To build rust-mos following changes to MOS.cmake are required:

--- clang/cmake/caches/MOS.cmake        2022-12-29 22:57:38.304883166 +0100
+++ clang/cmake/caches/RUST-MOS.cmake   2022-12-30 00:36:54.994806413 +0100
@@ -3,7 +3,7 @@
 # Usage for configuring:
 #   cmake -C [path-to-this-file] ...

-set(LLVM_TARGETS_TO_BUILD ""
+set(LLVM_TARGETS_TO_BUILD "X86"
     CACHE STRING "LLVM targets to build")
 set(LLVM_EXPERIMENTAL_TARGETS_TO_BUILD "MOS"
     CACHE STRING "LLVM experimental targets to build")
@@ -15,6 +15,8 @@
     CACHE BOOL "LLVM install toolchain only")

 set(LLVM_DEFAULT_TARGET_TRIPLE "mos-unknown-unknown" CACHE STRING "")
+set(LLVM_TOOLCHAIN_UTILITIES FileCheck CACHE STRING "")
+set(LLVM_INSTALL_UTILS "ON" CACHE STRING "")

 # The following options are principally to reduce space on Github action
 # runner builds. They make smaller, and possibly slower, releases; but the
@@ -55,6 +57,7 @@

 # Ship the release with these tools
 set(LLVM_MOS_TOOLCHAIN_TOOLS
+    llvm-config
     llvm-addr2line
     llvm-ar
     llvm-cxxfilt

The most significant change is adding X86 (host) target, I'm just investigating if it is really necessary. But even if not, host target is required for running rust build (buils.rs) scripts, which is really nice feature to have

@mrk-its
Copy link
Contributor Author

mrk-its commented Dec 31, 2022

It looks like -DLLVM_INSTALL_TOOLCHAIN_ONLY=OFF is also needed, without it rust-mos build failed on missing include/llvm-c/BitReader.h header

@mysterymath
Copy link
Member

These changes LGTM, especially since we do set the default target triple explicitly. Could you make a PR with them when you get the chance? I'll merge it immediately.

mrk-its added a commit to mrk-its/llvm-mos that referenced this issue Jan 5, 2023
@mrk-its
Copy link
Contributor Author

mrk-its commented Jan 5, 2023

These changes LGTM, especially since we do set the default target triple explicitly. Could you make a PR with them when you get the chance? I'll merge it immediately.

Here it is: #276

Thanks!

mysterymath pushed a commit that referenced this issue Jan 6, 2023
@mysterymath
Copy link
Member

Closed by #276.

@mrk-its mrk-its closed this as completed Jan 6, 2023
mysterymath added a commit that referenced this issue Jan 23, 2023
This reverts commit ca75934.
This doubles our installed size to 2GiB, which just isn't acceptible for
a 6502 compiler. We need to be a lot more targeted about what we include
in our release in general, so this change needs to figure out exactly
what must be included to build rust-mos.

We also may need to split out builds into a full and user pair, if too
much stuff is needed to build rust-mos.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request p1
Projects
None yet
Development

No branches or pull requests

2 participants