Skip to content

Fails to build on Windows arm64 (tries to pass MSVC flags to clang.exe) #2674

@dennisameling

Description

@dennisameling

I'm trying to add Windows arm64 support to Selenium. However, the build fails with:

 running "clang" "-O0" "--target=aarch64-pc-windows-msvc" "-ffunction-sections" "-fdata-sections" "-g" "-fno-omit-frame-pointer" "--target=aarch64-pc-windows-msvc" "-I" "include" "-I" "C:\\_bazel\\execroot\\_main\\bazel-out/arm64_windows-fastbuild/bin/external/crates__ring-0.17.8/_bs.out_dir" "/nologo" "/DCOMPILER_MSVC" "/DNOMINMAX" "/D_WIN32_WINNT=0x0601" "/D_CRT_SECURE_NO_DEPRECATE" "/D_CRT_SECURE_NO_WARNINGS" "/bigobj" "/Zm500" "/EHsc" "/wd4351" "/wd4291" "/wd4250" "/wd4996" "/showIncludes" "/MD" "/Od" "/Z7" "/wd4117" "-D__DATE__=\"redacted\"" "-D__TIMESTAMP__=\"redacted\"" "-D__TIME__=\"redacted\"" "/Zc:inline" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-DNDEBUG" "-c" "-oC:\\_bazel\\execroot\\_main\\bazel-out/arm64_windows-fastbuild/bin/external/crates__ring-0.17.8/_bs.out_dir\\aesv8-armx-win64.o" "C:\\_bazel\\execroot\\_main\\bazel-out/arm64_windows-fastbuild/bin/external/crates__ring-0.17.8/_bs.cargo_runfiles/crates__ring-0.17.8/pregenerated\\aesv8-armx-win64.S"
clang: error: no such file or directory: '/nologo'
clang: error: no such file or directory: '/DCOMPILER_MSVC'
clang: error: no such file or directory: '/DNOMINMAX'
clang: error: no such file or directory: '/D_WIN32_WINNT=0x0601'
clang: error: no such file or directory: '/D_CRT_SECURE_NO_DEPRECATE'
clang: error: no such file or directory: '/D_CRT_SECURE_NO_WARNINGS'
clang: error: no such file or directory: '/bigobj'
clang: error: no such file or directory: '/Zm500'
clang: error: no such file or directory: '/EHsc'
clang: error: no such file or directory: '/wd4351'
clang: error: no such file or directory: '/wd4291'
clang: error: no such file or directory: '/wd4250'
clang: error: no such file or directory: '/wd4996'
clang: error: no such file or directory: '/showIncludes'
clang: error: no such file or directory: '/MD'
clang: error: no such file or directory: '/Od'
clang: error: no such file or directory: '/Z7'
clang: error: no such file or directory: '/wd4117'
clang: error: no such file or directory: '/Zc:inline'
thread 'main' panicked at external/crates__ring-0.17.8/build.rs:670:9:
execution failed

This is most likely due to this workaround where the compiler is forced to be clang.exe for the aarch64-pc-windows-msvc target. It's trying to pass MSVC-related flags to clang.exe.

I've submitted a PR that will hopefully fix this issue: #2673

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions