aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRyan Prichard <rprichard@google.com>2019-06-12 17:47:39 -0700
committerRyan Prichard <rprichard@google.com>2019-06-12 17:47:39 -0700
commit2808734be2f4bb0f10f81203901022b1288358d9 (patch)
tree17d0ec6f2c3afa14b250e90a1b38cd6773c81f32 /docs
parentb334cc4b91e7b993352330b59a1f9dc97d81e65a (diff)
downloadndk-2808734be2f4bb0f10f81203901022b1288358d9.tar.gz
Pass -fno-experimental-isel to avoid Clang bug
For ARM64 -O0, Clang uses the GlobalISel instruction selector, which can generate debug info with bad line number info. Pass -fno-experimental-isel to turn off GlobalISel until the upstream LLVM issue is fixed. Bug: https://github.com/android-ndk/ndk/issues/1004 Test: checkbuild.py && run_tests.py Change-Id: I0aa92a8c57ce1cebd38ccc3d14dd3147477bc4b0
Diffstat (limited to 'docs')
-rw-r--r--docs/BuildSystemMaintainers.md5
-rw-r--r--docs/changelogs/Changelog-r20.md4
-rw-r--r--docs/changelogs/Changelog-r21.md4
3 files changed, 13 insertions, 0 deletions
diff --git a/docs/BuildSystemMaintainers.md b/docs/BuildSystemMaintainers.md
index 598432271..3e0a888a1 100644
--- a/docs/BuildSystemMaintainers.md
+++ b/docs/BuildSystemMaintainers.md
@@ -363,9 +363,14 @@ assembler. If using `-fno-integrated-as`, you must explicitly pass
use the integrated assembler, and this flag is not needed in that case. See
[Issue 906].
+Clang outputs debug info with bad line number info when compiling for ARM64 and
+`-O0` (no optimizations). To work around this issue, pass
+`-fno-experimental-isel` to Clang. See [Issue 1004].
+
[Issue 635]: https://github.com/android-ndk/ndk/issues/635
[Issue 884]: https://github.com/android-ndk/ndk/issues/884
[Issue 906]: https://github.com/android-ndk/ndk/issues/906
+[Issue 1004]: https://github.com/android-ndk/ndk/issues/1004
[Position-independent executables]: https://en.wikipedia.org/wiki/Position-independent_code#Position-independent_executables
## Useful Arguments
diff --git a/docs/changelogs/Changelog-r20.md b/docs/changelogs/Changelog-r20.md
index d49a1900d..907a35a62 100644
--- a/docs/changelogs/Changelog-r20.md
+++ b/docs/changelogs/Changelog-r20.md
@@ -52,6 +52,9 @@ For Android Studio issues, follow the docs on the [Android Studio site].
`-march=armv7-a` when building for 32-bit ARM with the non-integrated
assembler, or use the integrated assembler. ndk-build and CMake already
contain these workarounds.
+ * [Issue 1004]: Clang outputs debug info with bad line number info when
+ compiling for ARM64 and `-O0` (no optimizations). Third-party build systems
+ can pass `-fno-experimental-isel` to Clang to work around this issue.
* This version of the NDK is incompatible with the Android Gradle plugin
version 3.0 or older. If you see an error like
`No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android`,
@@ -64,4 +67,5 @@ For Android Studio issues, follow the docs on the [Android Studio site].
[Issue 884]: https://github.com/android-ndk/ndk/issues/884
[Issue 888]: https://github.com/android-ndk/ndk/issues/888
[Issue 906]: https://github.com/android-ndk/ndk/issues/906
+[Issue 1004]: https://github.com/android-ndk/ndk/issues/1004
[use plugin version 3.1 or newer]: https://developer.android.com/studio/releases/gradle-plugin#updating-plugin
diff --git a/docs/changelogs/Changelog-r21.md b/docs/changelogs/Changelog-r21.md
index a22735f2d..c51f99bbb 100644
--- a/docs/changelogs/Changelog-r21.md
+++ b/docs/changelogs/Changelog-r21.md
@@ -45,6 +45,9 @@ For Android Studio issues, follow the docs on the [Android Studio site].
`-march=armv7-a` when building for 32-bit ARM with the non-integrated
assembler, or use the integrated assembler. ndk-build and CMake already
contain these workarounds.
+ * [Issue 1004]: Clang outputs debug info with bad line number info when
+ compiling for ARM64 and `-O0` (no optimizations). Third-party build systems
+ can pass `-fno-experimental-isel` to Clang to work around this issue.
* This version of the NDK is incompatible with the Android Gradle plugin
version 3.0 or older. If you see an error like
`No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android`,
@@ -56,4 +59,5 @@ For Android Studio issues, follow the docs on the [Android Studio site].
[Issue 855]: https://github.com/android-ndk/ndk/issues/855
[Issue 884]: https://github.com/android-ndk/ndk/issues/884
[Issue 906]: https://github.com/android-ndk/ndk/issues/906
+[Issue 1004]: https://github.com/android-ndk/ndk/issues/1004
[use plugin version 3.1 or newer]: https://developer.android.com/studio/releases/gradle-plugin#updating-plugin