Skip to content

Commit

Permalink
[Android] Fix cpp_rpc build for android with NDK>=23 (#13118)
Browse files Browse the repository at this point in the history
With NDK>= 23 when we specify explicitly linker then we got the
following error:

```
ld.gold: --no-rosegment: unknown option
```

From the github repository of NDK, I found that the only one right way
to configure linker is using `-DANDROID_LD` variable:
android/ndk#1426 (comment)

Removed setting linker manually and by default `LLD` will be used.

Checked that it works on the following versions of NDK:
- 20.0.5594570
- 21.4.7075529
- 22.1.7171670
- 23.0.7599858
- 23.1.7779620
- 24.0.8215888
- 25.1.8937393
  • Loading branch information
echuraev committed Oct 20, 2022
1 parent 458ca81 commit 59c0ef8
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions apps/cpp_rpc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ if (OS)
endif()
endif()

if(USE_OPENCL)
if (ANDROID_ABI)
set_property(TARGET tvm_rpc PROPERTY LINK_FLAGS -fuse-ld=gold)
endif()
endif()

target_include_directories(
tvm_rpc
PUBLIC "../../include"
Expand Down

0 comments on commit 59c0ef8

Please sign in to comment.