Skip to content

Auto discover unix linker path and setup Android NDK linker - #4034

Merged
asaadaldien merged 3 commits into
mainfrom
ataei-unix_linker_discovery
Dec 2, 2020
Merged

asaadaldien merged 3 commits into
mainfrom
ataei-unix_linker_discovery

Conversation

@asaadaldien

@asaadaldien asaadaldien commented Dec 1, 2020 •

Copy link
Copy Markdown
Contributor

Change default behavior when IREE_LLVMAOT_LINKER_PATH isn't set for unix host and target systems:

  • For unix host & target search for system linker path.
  • For android target set up linker path using ANDROID_NDK variable.

@asaadaldien
asaadaldien requested a review from ScottTodd December 1, 2020 07:04
@asaadaldien

Copy link
Copy Markdown
Contributor Author

This should close issues #2391 and #2645

@asaadaldien
asaadaldien requested a review from ScottTodd December 2, 2020 07:05
if (targetTriple.isAndroid()) {
char *androidNDKPath = std::getenv("ANDROID_NDK");
if (!androidNDKPath) return toolPath;
// TODO(ataei, benvanik): Windows cross-linking android NDK support.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The windows linker tool is for Windows targets, the TODO here for when compiling for Andorid target on windows host

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

hmmm, shouldn't have isWindowsMSVCEnvironment if we must have it here then the TODO I have needs to move to createWindowsLinkerTool but I think we can keep linker to be target specific and do similar thing (e.g build for windows on linux ?)

@asaadaldien
asaadaldien merged commit 65d7d91 into main Dec 2, 2020
@asaadaldien
asaadaldien deleted the ataei-unix_linker_discovery branch December 2, 2020 17:59
ScottTodd added a commit that referenced this pull request Dec 17, 2020
LLVM AOT is now stable enough to run by default on all build/test configurations (mainly thanks to: #3757, #4034, #3928).

We don't see a path to deployment on our primary platforms using LLVM JIT and the backend adds excess maintenance cost in the main repository (e.g. runtime code that depends on LLVM -> slow builds and can't build on Android), so this removes the `llvm-ir` compiler target and corresponding `llvm` HAL backend in favor of the `dylib-llvm-aot` compiler target and `dylib` HAL backend (we have many names for the same components :P).
benvanik pushed a commit that referenced this pull request Dec 22, 2020
LLVM AOT is now stable enough to run by default on all build/test configurations (mainly thanks to: #3757, #4034, #3928).

We don't see a path to deployment on our primary platforms using LLVM JIT and the backend adds excess maintenance cost in the main repository (e.g. runtime code that depends on LLVM -> slow builds and can't build on Android), so this removes the `llvm-ir` compiler target and corresponding `llvm` HAL backend in favor of the `dylib-llvm-aot` compiler target and `dylib` HAL backend (we have many names for the same components :P).
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.

2 participants