target_cpu="arm" gn gen fails but target_cpu="arm64" succeeds

41 views
Skip to first unread message

matthew Hintzen

unread,
Mar 30, 2021, 2:34:39 PMMar 30
to angleproject
Hello All

I'm build a UWP version of ANGLE, and I can get the gn gen to work for target_cpu of x86, x64, arm64 but when I try to do a simple arm I get an error

Here is the structure of the command I'm running

>gn gen --ide=vs2019 out/uwp/<target_cpu>/release --args="is_debug=false is_component_build=false symbol_level=1 is_clang=false target_cpu=\"<target_cpu>\" target_os=\"winuwp\"" --export-compile-commands

Here is the output from running the process for target_cpu set to arm64:

S:\src\Opensource\angle>gn gen --ide=vs2019 out/uwp/arm64/release --args="is_debug=false is_component_build=false symbol_level=1 is_clang=false target_cpu=\"arm64\" target_os=\"winuwp\"" --export-compile-commands
Generating Visual Studio projects took 691ms
Generating compile_commands took 17ms
Done. Made 63 targets from 68 files in 13844ms

And here is the output from running the process for target_cpu set to arm:

S:\src\Opensource\angle>gn gen --ide=vs2019 out/uwp/arm/release --args="is_debug=false is_component_build=false symbol_level=1 is_clang=false target_cpu=\"arm\" target_os=\"winuwp\"" --export-compile-commands
Traceback (most recent call last):
  File "S:/src/Opensource/angle/build/vs_toolchain.py", line 573, in <module>
    sys.exit(main())
  File "S:/src/Opensource/angle/build/vs_toolchain.py", line 569, in main
    return commands[sys.argv[1]](*sys.argv[2:])
  File "S:/src/Opensource/angle/build/vs_toolchain.py", line 396, in CopyDlls
    raise Exception('Unknown target_cpu: ' + target_cpu)
Exception: Unknown target_cpu: arm
ERROR at //build/toolchain/win/BUILD.gn:54:3: Script returned non-zero exit code.
  exec_script("../../vs_toolchain.py",
  ^----------
Current dir: S:/src/Opensource/angle/out/uwp/arm/release/
Command: C:/Devtools/depot_tools/bootstrap-3_8_0_chromium_8_bin/python/bin/python.exe S:/src/Opensource/angle/build/vs_toolchain.py copy_dlls S:/src/Opensource/angle/out/uwp/arm/release Release arm
Returned 1.
See //BUILD.gn:247:3: which caused the file to be included.
  copy("copy_compiler_dll") {
  ^--------------------------

Interesting side note for giggles I tried putting in a value of arm32 for target_cpu and got back this output:

S:\src\Opensource\angle>gn gen --ide=vs2019 out/uwp/arm32/release --args="is_debug=false is_component_build=false symbol_level=1 is_clang=false target_cpu=\"arm32\" target_os=\"winuwp\"" --export-compile-commands
ERROR at //build/config/BUILDCONFIG.gn:251:3: Assertion failed.
  assert(target_cpu == "x86" || target_cpu == "x64" || target_cpu == "arm" ||
  ^-----

The interesting thing there is the error output from the gn assertion checks says that target_cpu = "arm" should be allowed.

Any suggestions on what I'm doing wrong getting the ARM to build?

Matthew Hintzen, Acme AtronOmatic
MyRadar.com

matthew Hintzen

unread,
Mar 30, 2021, 2:38:28 PMMar 30
to angleproject
This is just for creating the VS .sln files btw.

Geoff Lang

unread,
Mar 30, 2021, 3:20:09 PMMar 30
to mat...@acmeaom.com, angleproject
My guess is that this would work if you set is_clang=true. The msvc path isn't supported very much in gn right now but you could either file a bug on crbug.com about it or try hacking it into SetEnvironmentAndGetRuntimeDllDirs

--
You received this message because you are subscribed to the Google Groups "angleproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angleproject...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/angleproject/721e79c1-8279-4067-b3b1-17e0b23aca44n%40googlegroups.com.

matthew Hintzen

unread,
Mar 30, 2021, 3:36:01 PMMar 30
to angleproject
sadly is_clang=true didn't work (same error), but thanks for trying!

I'll file a bug and try your hack, Any other suggestions from anyone else is greatly appreciated
Reply all
Reply to author
Forward
0 new messages