sdk icon indicating copy to clipboard operation
sdk copied to clipboard

(Willing to PR) `generate_idefiles.py` fails to work on x64 MacOS

Open fzyzcjy opened this issue 3 years ago • 0 comments

./tools/generate_idefiles.py

python3 /Volumes/MyExternal/ExternalRefCode/dart-sdk/sdk/tools/gn.py -m all -a all -v
Traceback (most recent call last):
  File "/Volumes/MyExternal/ExternalRefCode/dart-sdk/sdk/tools/gn.py", line 674, in <module>
    sys.exit(Main(sys.argv))
  File "/Volumes/MyExternal/ExternalRefCode/dart-sdk/sdk/tools/gn.py", line 664, in Main
    result = RunGnOnConfiguredConfigurations(args)
  File "/Volumes/MyExternal/ExternalRefCode/dart-sdk/sdk/tools/gn.py", line 625, in RunGnOnConfiguredConfigurations
    BuildGnCommand(args, mode, arch, target_os, sanitizer,
  File "/Volumes/MyExternal/ExternalRefCode/dart-sdk/sdk/tools/gn.py", line 606, in BuildGnCommand
    ToGnArgs(args, mode, arch, target_os, sanitizer, args.verify_sdk_hash))
  File "/Volumes/MyExternal/ExternalRefCode/dart-sdk/sdk/tools/gn.py", line 219, in ToGnArgs
    gn_args['host_cpu'] = HostCpuForArch(arch)
  File "/Volumes/MyExternal/ExternalRefCode/dart-sdk/sdk/tools/gn.py", line 103, in HostCpuForArch
    raise Exception(
Exception: Failed to find a C host architecture for ia32. Need one of ['x86'] but only ['x64'] are available.

But with ./tools/generate_idefiles.py --verbose --arch x64, still same error.

With this modification, it works:

image

./tools/generate_idefiles.py --verbose --arch x64
python3 /Volumes/MyExternal/ExternalRefCode/dart-sdk/sdk/tools/gn.py -m all -a x64 -v
gn gen --check in xcodebuild/DebugX64
gn gen --check in xcodebuild/ReleaseX64
gn gen --check in xcodebuild/ProductX64
Generating Xcode projects took 57ms
Done. Made 319 targets from 88 files in 1739ms
Generating Xcode projects took 55ms
Done. Made 319 targets from 88 files in 1739ms
Generating Xcode projects took 54ms
Done. Made 319 targets from 88 files in 1739ms
GN Time: 1.901 seconds
python3 /Volumes/MyExternal/ExternalRefCode/dart-sdk/sdk/tools/gn.py -m all -a arm,arm64 --os android -v
gn gen --check in xcodebuild/DebugAndroidARM
gn gen --check in xcodebuild/DebugAndroidARM64
gn gen --check in xcodebuild/ReleaseAndroidARM
gn gen --check in xcodebuild/ReleaseAndroidARM64
gn gen --check in xcodebuild/ProductAndroidARM
gn gen --check in xcodebuild/ProductAndroidARM64
Generating Xcode projects took 62ms
Done. Made 341 targets from 94 files in 3436ms
Generating Xcode projects took 66ms
Done. Made 341 targets from 94 files in 3446ms
Generating Xcode projects took 68ms
Done. Made 341 targets from 94 files in 3457ms
Generating Xcode projects took 68ms
Done. Made 341 targets from 94 files in 3451ms
Generating Xcode projects took 68ms
Done. Made 341 targets from 94 files in 3460ms
Generating Xcode projects took 65ms
Done. Made 341 targets from 94 files in 3468ms
GN Time: 3.822 seconds

fzyzcjy avatar Sep 17 '22 02:09 fzyzcjy