Changing temp Dir: /var/tmp

What are the various option we have in setting tmp dir.

I can’t use the default var/tmp, and I am looking to pass the dir during compiler invocation as an arg.

any help is great.

Thanks
Ramakrishna

Hi,

LLVM will look for the following environment variables to be set, and if not it will use /var/tmp:

TMPDIR, TMP, TEMP, TEMPDIR

You should be able to override its behaviour by setting one of those.

Cheers,

James

I have build swift+clang+llvm to iOS and I having Lock issues on /var/temp during module compilation [on simulator every thing works fine], on iOS device I have to use the os provided tmp directory which will be different for every app.

I am looking into llvm::sys::path & Path.inc that defined P_tmpdir , “/var/tmp”.
I am changing this according to my requirement as I can’t use environment variables.

Thanks
Ramakrishna M