Skip to content

Commit

Permalink
Android: Remove -fno-integrated-as, it can break arm64v8 build
Browse files Browse the repository at this point in the history
We found that this flag causes this error on PR #48812 which does not add any
fancy inline assembly:
```
/tmp/tile_set-ce236a.s: Assembler messages:
/tmp/tile_set-ce236a.s:34676: Error: selected processor does not support `bfc x0,#32,#32'
clang++: error: assembler command failed with exit code 1 (use -v to see invocation)
```

That flag is mentioned in various errors related to assembler failures on
arm64v8 with Clang from the Android NDK.

It was added in Godot in #6958 when migrating from GCC to Clang, and is indeed
referenced in the NDK's Clang migration guide:
https://android.googlesource.com/platform/ndk/+/master/docs/ClangMigration.md

> Especially for ARM and ARM64, Clang is much stricter about assembler rules
> than GCC/GAS. Use `-fno-integrated-as` if Clang reports errors in inline
> assembly or assembly files that you don't wish to modernize.

We don't get those errors nowadays so it seems the flag is no longer needed.

(cherry picked from commit 23f7c75)
  • Loading branch information
akien-mga committed May 19, 2021
1 parent f75ace5 commit be12a3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platform/android/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def mySpawn(sh, escape, cmd, args, env):
env["RANLIB"] = tools_path + "/ranlib"
env["AS"] = tools_path + "/as"

common_opts = ["-fno-integrated-as", "-gcc-toolchain", gcc_toolchain_path]
common_opts = ["-gcc-toolchain", gcc_toolchain_path]

# Compile flags

Expand Down

0 comments on commit be12a3d

Please sign in to comment.