This is an archive of the discontinued LLVM Phabricator instance.

Use /data/local/tmp as temp directory on android
ClosedPublic

Authored by tberghammer on May 7 2015, 9:42 AM.

Details

Summary

Use /data/local/tmp as temp directory on android

If no temp directory specified by the user on android then fall back
to /data/local/tmp what is always present on the device. It removes
the dependency of specifying TMPDIR for executing platform commands
on android.

Diff Detail

Event Timeline

tberghammer updated this revision to Diff 25200.May 7 2015, 9:42 AM
tberghammer retitled this revision from to Use /data/local/tmp as temp directory on android.
tberghammer updated this object.
tberghammer edited the test plan for this revision. (Show Details)
tberghammer added reviewers: labath, ovyalov.
tberghammer added a subscriber: Unknown Object (MLST).

Overwrite the ComputeGlobalTempFileDirectory function instead of ComputeProcessTempFileDirectory

ovyalov edited edge metadata.May 7 2015, 10:41 AM

Please see my comment.

source/Host/android/HostInfoAndroid.cpp
99

What do you think about adding lldb sub directory - i.e. /data/local/tmp/lldb?
In this case it will be consistent with default implementation (https://github.com/llvm-mirror/lldb/blob/789afe8e6565a1370b2f34e075e9ca5289d362f8/source/Host/common/HostInfoBase.cpp#L360) .

tberghammer updated this revision to Diff 25300.May 8 2015, 3:03 AM
tberghammer edited edge metadata.

Changing the default temp directory to include /lldb suffix

labath accepted this revision.May 8 2015, 3:19 AM
labath edited edge metadata.

LGTM.

This revision is now accepted and ready to land.May 8 2015, 3:19 AM
This revision was automatically updated to reflect the committed changes.