[all-commits] [llvm/llvm-project] 98e50a: [lldb] Honor the CPU type & subtype when launching...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Wed Feb 3 13:42:21 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 98e50a7d4c12d2c32eb15e55cbb2e1f89a802e28
      https://github.com/llvm/llvm-project/commit/98e50a7d4c12d2c32eb15e55cbb2e1f89a802e28
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2021-02-03 (Wed, 03 Feb 2021)

  Changed paths:
    M lldb/source/Host/macosx/objcxx/Host.mm
    M lldb/source/Utility/ArchSpec.cpp
    A lldb/test/API/macosx/posix_spawn/Makefile
    A lldb/test/API/macosx/posix_spawn/TestLaunchProcessPosixSpawn.py
    A lldb/test/API/macosx/posix_spawn/arm64.c
    A lldb/test/API/macosx/posix_spawn/x86_64.c
    A lldb/test/API/macosx/posix_spawn/x86_64h.c

  Log Message:
  -----------
  [lldb] Honor the CPU type & subtype when launching on macOS

Honor the CPU type (and subtype) when launching the inferior on macOS.

Part of this functionality was thought to be no longer needed and
removed in 85bd4369610fe60397455c8e0914a09288285e84, however it's still
needed, for example to launch binaries under Rosetta 2 on Apple Silicon.

This patch will use posix_spawnattr_setarchpref_np if available and
fallback to posix_spawnattr_setbinpref_np if not.

Differential revision: https://reviews.llvm.org/D95922




More information about the All-commits mailing list