[cfe-dev] icecream - what should /proc/cpuinfo contain on remote machines?

Miller Henry via cfe-dev cfe-dev at lists.llvm.org
Wed May 10 14:32:40 PDT 2017


We call clang something like:

On the machine creating the environment. 
mkdir -p tmp/usr/bin
cd tmp
cp 'which clang' usr/bin
# a lot of magic to figure out which shared libraries clang needs and copy them, and a bunch of other files clang needs
tar -zcf . ../MyEnvrionment.tgz

Then transfer this to the remote machine where we do:
mkdir /var/icecc/.../environment # actually make temp directory of some sort)
cd /var/icecc/.../environment
tar -xf /path/to/MyEnvironment.tgz
chroot .
/usr/bin/clang -x c - -o file.o -fpreprocessed -pipe -Xclang -main-file-name -Xclang [filename] -no-canonical-prefixes -fdebug-prefix-map=%s/=/ [something - only if dwarfFissionEnabled]  [whatever other arguments the user supplied except for a few special ones we strip]

I'm probably missing something from the above, it is tricky to follow the entire chain of arguments.

The basic idea is to create a compiler package somewhere (might be the local machine, but if some of the remotes are a different CPU it gets complex). Then we transfer this environment to some remote machines.  Then we run the preprocessor on the local build machine and transfer the preprocessed file to remote machines to compile (fed to stdin of clang), and then transfer the result back to the local machine.  This allows running make with a large -j value for much faster builds (I often run -j80 on a 6 core machine)

-----Original Message-----
From: cfe-dev [mailto:cfe-dev-bounces at lists.llvm.org] On Behalf Of Joerg Sonnenberger via cfe-dev
Sent: Wednesday, May 10, 2017 4:02 PM
To: cfe-dev at lists.llvm.org
Subject: Re: [cfe-dev] icecream - what should /proc/cpuinfo contain on remote machines?

On Wed, May 10, 2017 at 07:21:01PM +0000, Miller Henry via cfe-dev wrote:
> Greetings, I'm the maintainer of icecream, and I'm trying to solve a 
> bug some of my users are seeing: when using clang  4.0 their build 
> fails because the file /proc/cpuinfo does not exist.  I'm trying to 
> figure out what the right solution to this is. See
> https://github.com/icecc/icecream/issues/176
> From what we can tell this came in from: https://reviews.llvm.org/D25564.

How exactly are you calling clang?

Joerg
_______________________________________________
cfe-dev mailing list
cfe-dev at lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


More information about the cfe-dev mailing list