@@ -1088,43 +1088,6 @@ static Status LaunchProcessPosixSpawn(const char *exe_path,
1088
1088
return error;
1089
1089
}
1090
1090
1091
- // posix_spawnattr_setbinpref_np appears to be an Apple extension per:
1092
- // http://www.unix.com/man-page/OSX/3/posix_spawnattr_setbinpref_np/
1093
- #if !defined(__arm__)
1094
-
1095
- // Don't set the binpref if a shell was provided. After all, that's only
1096
- // going to affect what version of the shell
1097
- // is launched, not what fork of the binary is launched. We insert "arch
1098
- // --arch <ARCH> as part of the shell invocation
1099
- // to do that job on OSX.
1100
-
1101
- if (launch_info.GetShell () == FileSpec ()) {
1102
- // We don't need to do this for ARM, and we really shouldn't now that we
1103
- // have multiple CPU subtypes and no posix_spawnattr call that allows us
1104
- // to set which CPU subtype to launch...
1105
- const ArchSpec &arch_spec = launch_info.GetArchitecture ();
1106
- cpu_type_t cpu = arch_spec.GetMachOCPUType ();
1107
- cpu_type_t sub = arch_spec.GetMachOCPUSubType ();
1108
- if (cpu != 0 && cpu != static_cast <cpu_type_t >(UINT32_MAX) &&
1109
- cpu != static_cast <cpu_type_t >(LLDB_INVALID_CPUTYPE) &&
1110
- !(cpu == 0x01000007 && sub == 8 )) // If haswell is specified, don't try
1111
- // to set the CPU type or we will fail
1112
- {
1113
- size_t ocount = 0 ;
1114
- error.SetError (::posix_spawnattr_setbinpref_np (&attr, 1 , &cpu, &ocount),
1115
- eErrorTypePOSIX);
1116
- if (error.Fail ())
1117
- LLDB_LOG (log,
1118
- " error: {0}, ::posix_spawnattr_setbinpref_np ( &attr, 1, "
1119
- " cpu_type = {1:x}, count => {2} )" ,
1120
- error, cpu, ocount);
1121
-
1122
- if (error.Fail () || ocount != 1 )
1123
- return error;
1124
- }
1125
- }
1126
- #endif // !defined(__arm__)
1127
-
1128
1091
const char *tmp_argv[2 ];
1129
1092
char *const *argv = const_cast <char *const *>(
1130
1093
launch_info.GetArguments ().GetConstArgumentVector ());
0 commit comments