Skip to content

arm64 engine builds not compatible with --local-engine tool option #112679

Closed

Description

@yjbanov

Engine built for arm64 is not picked up by --local-engine. Passing host_debug_unopt_arm64 still redirects it to host_debug_unopt, which is not the correct directory.

Offending lines in the tool seem to be:

// Strip suffix for various archs.

This makes the dev cycle on M1 laptops awkward. You have to use Rosetta (i.e. prepend arch -x86_64 to commands), which is not documented in our wikis (and unlikely to be documented, since this is a bug, not a feature).

Activity

  1. added
    c: contributor-productivityTeam-specific productivity, code health, technical debt.
    toolAffects the "flutter" command-line tool. See also t: labels.
    a: buildBuilding flutter applications with the tool
    on Sep 29, 2022
  2. jmagman commented on Sep 29, 2022

    @jmagman
    Member

    This indeed fails:

      testWithoutContext('works if local engine is host engine with suffixes', () async {
        final FileSystem fileSystem = MemoryFileSystem.test();
        final Directory localEngine = fileSystem
            .directory('$kArbitraryEngineRoot/src/out/host_debug_unopt_arm64/')
          ..createSync(recursive: true);
    
        final BufferLogger logger = BufferLogger.test();
        final LocalEngineLocator localEngineLocator = LocalEngineLocator(
          fileSystem: fileSystem,
          flutterRoot: 'flutter/flutter',
          logger: logger,
          userMessages: UserMessages(),
          platform: FakePlatform(environment: <String, String>{}),
        );
    
        expect(
          await localEngineLocator.findEnginePath(null, localEngine.path, null),
          matchesEngineBuildPaths(
            hostEngine: '/arbitrary/engine/src/out/host_debug_unopt_arm64',
            targetEngine: '/arbitrary/engine/src/out/host_debug_unopt_arm64',
          ),
        );
      });

    testWithoutContext('works if local engine is host engine', () async {

    cc @christopherfujino

  3. cbracken commented on Sep 29, 2022

    @cbracken
    Member

    Closing as dupe of #103386

  4. jmagman commented on Sep 29, 2022

    @jmagman
    Member

    Is it a duplicate? We could fix this without any gen_snapshot work.

  5. jmagman commented on Sep 29, 2022

    @jmagman
    Member
    src$ ./flutter/tools/gn --unoptimized --mac-cpu=arm64
    ...
    Generating GN files in: out/host_debug_unopt_arm64
    
  6. cbracken commented on Sep 29, 2022

    @cbracken
    Member

    Reopened as not a dupe since this is specifically for --local-engine flag in the tool, which is one component of getting the above item done. It's very likely I'll hit this up while landing the rest of it though. If I can also get host/target builds untangled, then I'm hoping host_debug_unopt_arm64 can go away.

    Note that #103386 covers a ton more than just gen_snapshot. gen_snapshot is covered in the sub-issue you filed: #101138

    The broader issue I linked is migrating to the arm64 clang toolchain, enabling host unittests, updating tooling to work with the updated paths, etc. Generating universal binary gen_snapshots is one piece of that, but a pretty small part.

  7. self-assigned this
    on Nov 14, 2022
  8. added
    P1High-priority issues at the top of the work list
    on Nov 14, 2022
  9. github-actions commented on Nov 29, 2022

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  10. locked as resolved and limited conversation to collaborators on Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: buildBuilding flutter applications with the toolc: contributor-productivityTeam-specific productivity, code health, technical debt.platform-macosBuilding on or for macOS specificallytoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions