FrozenGene commented on issue #4857: Windows Support for cpp_rpc URL: https://github.com/apache/incubator-tvm/pull/4857#issuecomment-586882243 > @FrozenGene Thanks for taking a peek. I totally understand limited time. > > You are right, I do not include a case for Android to skip linking with pthread. My only excuse was can't really find a solid answer to this in CMake. "if(ANDROID)" would be nice if that's how it is done. I'll be very happy to implement any suggestion though! > > I made this "first class" option from the main CMake because a) Its a much better implementation on Windows than the python version, which took a bunch of hacks to make decent performance. b) Was very easy to link to the tvm libs given its a sub CMake project. I agree all about the advantages of CMake. For Android, I think the [CMAKE_SYSTEM_NAME](https://cmake.org/cmake/help/v3.4/variable/CMAKE_SYSTEM_NAME.html) maybe could help us. But it requires the users to specify the build os, I prefer we do it automatically, i.e. we could use the compiler option `-dumpmachine` to get we are in the android or linux. For example, when I run: ` ~/ndk_tools/bin/clang -dumpmachine`, it will output: `aarch64-none-linux-android` If I run arm linux compiler, it will output: `aarch64-linux-gnueabi`. So I think we could this to distinguish android or linux. If we can not run this command successfully, we do the default things. Please make sure this [Android ndk tools](https://developer.android.com/ndk/downloads) and [linaro linux] (https://www.linaro.org/downloads/) could compile cpp/rpc successfully, because they are important platforms to use cpp_rpc. (Note. these two tools has windows os support too)
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services