[cmake-developers] Using reflinks during install phase

Alessandro Di Federico ale at clearmind.me
Wed May 28 13:20:17 EDT 2014


Hi, I'm working on a quite big project, namely LLVM. As you can
imagine, launching a `make install` it's quite time consuming, in
particular in Debug builds. However I'm using a smart file system
(BTRFS on Linux) which supports "reflinks", which basically means
that it's possible to create copy-on-write duplicate of a file, without
having to write the file contents again. This can be easily done using
`cp` (from the GNU Coreutils) with the --reflink parameter.

I wrote a very dirty patch launching cp with a system call, but if
you're interested I can put up something better.

Currently reflinks are supported only by BTRFS on Linux, but I think it
will be available also for ZFS users soon.
I'm aware this is useful in a very specific setting but the benefits
are so evident that I think it's worth implementing it.

--
Ale


More information about the cmake-developers mailing list