Skip to content

[Driver] Enable Classic Flang cross-compilation, e.g. from X86 to AArch64 #205

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

Merged

Conversation

bryanpkc
Copy link
Collaborator

@bryanpkc bryanpkc commented Nov 26, 2024

This PR changes how the driver finds the target-specific Classic Flang frontend tools (e.g. aarch64-unknown-linux-gnu-flang1, aarch64-unknown-linux-gnu-flang2) and headers, and modifies the build script to support building the cross-compiling toolchain, which must include LLD (LLVM's linker that support all targets), and OpenMP libraries for the target architecture. Target-specific libraries are installed under $LLVM_DIR/lib/$target/, which is how upstream LLVM installs them by default.

See the wiki for instructions on building a Classic Flang cross-compiler.

bryanpkc and others added 2 commits November 26, 2024 08:10
…ch64

Co-authored-by: Prabhdeep Singh Soni <prabhdeep.singh.soni3@huawei.com>
Also modified cmake/Modules/GetClangResourceDir.cmake to work around a missing
definition for PACKAGE_VERSION when cross-compiling OpenMP libraries.
@bryanpkc bryanpkc merged commit 95f63e4 into flang-compiler:release_19x Nov 27, 2024
19 checks passed
@bryanpkc bryanpkc deleted the support-cross-compilation branch November 27, 2024 18:57
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