-
Notifications
You must be signed in to change notification settings - Fork 282
Closed
Labels
Description
Description
I've installed NDK 25.2.9519653 and want to work with rust. However, the content of *-*-*-clang.cmd
causes issues. The content of such cmd script is:
@echo off
setlocal
call :find_bin
if "%1" == "-cc1" goto :L
set "_BIN_DIR=" && "%_BIN_DIR%clang.exe" --target=armv7a-linux-androideabi24 %*
if ERRORLEVEL 1 exit /b 1
goto :done
:L
rem Target is already an argument.
set "_BIN_DIR=" && "%_BIN_DIR%clang.exe" %*
if ERRORLEVEL 1 exit /b 1
goto :done
:find_bin
rem Accommodate a quoted arg0, e.g.: "clang"
rem https://github.com/android-ndk/ndk/issues/616
set _BIN_DIR=%~dp0
exit /b
:done
The fourth line, if "%1" == "-cc1" goto :L
, causes issues. Rust put a param "-march=armv7-a"
with armv7a target, and cmd will throw error
=armv7-a"" was unexpected at this time.
That's because the line is interpreted as if ""-march=armv7-a"" == "-cc1" goto :L
. When I comment out this line, it works well.
Affected versions
r25
Canary version
No response
Host OS
Windows
Host OS version
Windows 11
Affected ABIs
armeabi-v7a
Build system
ndk-build
Other build system
No response
minSdkVersion
24
Device API level
No response