This is an archive of the discontinued LLVM Phabricator instance.

[cmake] Support running compiler-rt tests in CrossWinToARMLinux.cmake
Needs ReviewPublic

Authored by broadwaylamb on Jul 9 2020, 9:06 AM.

Details

Reviewers
vvereschaka

Diff Detail

Event Timeline

broadwaylamb created this revision.Jul 9 2020, 9:06 AM

Hi Sergei,
sorry for a late answer.
I have tested these changes on Windows cross build to Aarch64 and I found the following problems:

  • looks like ssh.py arguments have been changed since the diff file was placed. Currently the correct string for COMPILER_RT_EMULATOR is the following:
set(COMPILER_RT_EMULATOR                "\\\"${Python3_EXECUTABLE}\\\" \\\"${LLVM_PROJECT_DIR}/libcxx/utils/ssh.py\\\" --execdir %%T --host ${REMOTE_TEST_USER}@${REMOTE_TEST_HOST} %%t" CACHE STRING "")
  • but I'm getting the following error during execution the tests:
$ "C:/buildbot/temp/build/./bin/clang.exe" "-gline-tables-only" "-gcodeview" "-gcolumn-info" "-fno-builtin" "-I" "C:/buildbot/temp/llvm-proj
ect/compiler-rt\lib\builtins" "-nodefaultlibs" "C:\buildbot\temp\llvm-project\compiler-rt\test\builtins\Unit\udivmodti4_test.c" "C:/buildbot
/temp/build/./lib/clang/12.0.0/lib/aarch64-linux-gnu\libclang_rt.builtins.a" "-lc" "-lm" "-o" "C:\buildbot\temp\build\runtimes\runtimes-bins
\compiler-rt\test\builtins\Unit\AARCH64LinuxConfig\Output\udivmodti4_test.c.tmp"
$ "C:/Python38/python.exe" "C:/buildbot/temp/llvm-project/libcxx/utils/ssh.py" "--execdir" "C:\buildbot\temp\build\runtimes\runtimes-bins\co
mpiler-rt\test\builtins\Unit\AARCH64LinuxConfig\Output" "--host" "ubuntu@jetson8.lab.llvm.org" "C:\buildbot\temp\build\runtimes\runtimes-bin
s\compiler-rt\test\builtins\Unit\AARCH64LinuxConfig\Output\udivmodti4_test.c.tmp" "C:\buildbot\temp\build\runtimes\runtimes-bins\compiler-rt
\test\builtins\Unit\AARCH64LinuxConfig\Output\udivmodti4_test.c.tmp"
# command stderr:
bash: C:buildbottempbuildruntimesruntimes-binscompiler-rttestbuiltinsUnitAARCH64LinuxConfigOutputudivmodti4_test.c.tmp: command not found

error: command failed with exit status: 127

the problem is with path format, it is getting converted into C:buildbottempbuildruntimesruntimes-binscompiler-rttestbuiltinsUnitAARCH64LinuxConfigOutputudivmodti4_test.c.tmp during the test execution.

  • looks like ssh.py arguments have been changed since the diff file was placed. Currently the correct string for COMPILER_RT_EMULATOR is the following:
set(COMPILER_RT_EMULATOR                "\\\"${Python3_EXECUTABLE}\\\" \\\"${LLVM_PROJECT_DIR}/libcxx/utils/ssh.py\\\" --execdir %%T --host ${REMOTE_TEST_USER}@${REMOTE_TEST_HOST} %%t" CACHE STRING "")

The usage of this ssh.py syntax depends on D83429, which is kind of controversial and probably won't be accepted as is.