github.com/hikaru7719/go@v0.0.0-20181025140707-c8b2ac68906a/misc/android/README (about)

     1  Android
     2  =======
     3  
     4  For details on developing Go for Android, see the documentation in the
     5  mobile subrepository:
     6  
     7  	https://github.com/golang/mobile
     8  
     9  To run the standard library tests, see androidtest.bash. Run it as
    10  
    11  	CC_FOR_TARGET=$STANDALONE_NDK_PATH/bin/clang GOARCH=arm64 ./androidtest.bash
    12  
    13  To create a standalone android NDK tool chain, follow the instructions on
    14  
    15  	https://developer.android.com/ndk/guides/standalone_toolchain
    16  
    17  To run tests on the Android device, add the bin directory to PATH so the
    18  go tool can find the go_android_$GOARCH_exec wrapper generated by
    19  androidtest.bash. Then, use the same GOARCH as when androidtest.bash ran
    20  and set GOOS to android. For example, to run the go1 benchmarks
    21  
    22  	export PATH=$GOROOT/bin:$PATH
    23  	cd $GOROOT/test/bench/go1/
    24  	GOOS=android GOARCH=arm64 go test -bench=. -count=N -timeout=T
    25