Skip to content

Commit 9326633

Browse files
authored
[lldb] Remove PATH workaround for Android (llvm#124682)
1 parent 5d3ae51 commit 9326633

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

lldb/source/Host/posix/ProcessLauncherPosixFork.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -230,25 +230,14 @@ MakeForkActions(const ProcessLaunchInfo &info) {
230230
return result;
231231
}
232232

233-
static Environment::Envp FixupEnvironment(Environment env) {
234-
#ifdef __ANDROID__
235-
// If there is no PATH variable specified inside the environment then set the
236-
// path to /system/bin. It is required because the default path used by
237-
// execve() is wrong on android.
238-
env.try_emplace("PATH", "/system/bin");
239-
#endif
240-
return env.getEnvp();
241-
}
242-
243233
ForkLaunchInfo::ForkLaunchInfo(const ProcessLaunchInfo &info)
244234
: separate_process_group(
245235
info.GetFlags().Test(eLaunchFlagLaunchInSeparateProcessGroup)),
246236
debug(info.GetFlags().Test(eLaunchFlagDebug)),
247237
disable_aslr(info.GetFlags().Test(eLaunchFlagDisableASLR)),
248238
wd(info.GetWorkingDirectory().GetPath()),
249239
argv(info.GetArguments().GetConstArgumentVector()),
250-
envp(FixupEnvironment(info.GetEnvironment())),
251-
actions(MakeForkActions(info)) {}
240+
envp(info.GetEnvironment().getEnvp()), actions(MakeForkActions(info)) {}
252241

253242
HostProcess
254243
ProcessLauncherPosixFork::LaunchProcess(const ProcessLaunchInfo &launch_info,

0 commit comments

Comments
 (0)