On Sat, Aug 11, 2018 at 12:32 AM, <[email protected]> wrote: > I'm excited to use tup for a new project but I'm having trouble getting it > to work in a simple situation on Windows. I'm trying to compile a single > "hello world" C file with clang and there seems to be a problem with tup > not understanding some of clang's temporary files. > > Here's the C file: > > #include <stdio.h> > > int main(int argc, char** argv) { > printf("hello\n"); > return 0; > } > > > Here's the Tupfile: > > : main.c |> clang -c %f -o %o |> main.o > : main.o |> clang -o %o %f |> main.exe > > > Here's the output: > > > * 1) clang -c main.c -o main.o > *** tup errors *** > tup error: File 'C:\test\main-645c19a0.o.tmp' was written to, but is not > in .tup/db. You probably should specify it as an output > -- Delete: C:\test\main-645c19a0.o.tmp > tup error: Expected to write to file 'main.o' from cmd 20 but didn't > *** Command failed due to errors processing the output dependencies. > [ ] 50% > *** tup: 1 job failed. > > > However, there is a main.o file in the directory after tup exits. I've > tried running the commands on the command line and they work okay. I've > observed the issue when using both 32 bit and 64 bit clang. This is all > on tup v0.7.6-33-g221ae9a on Windows 10. Everything works fine on a unix > based system. Any help or workarounds would be appreciated! > > Ahh it looks like in this case clang writes to main-XYZ.o.tmp and then calls NtSetInformationFile with a FILE_RENAME_INFORMATION to tell it to rename the file, and tup didn't have a hook for this function. (We already hook the various MoveFile* and ReplaceFile* functions, but apparently we need another way to rename files :)
Can you try http://gittup.org/tup/win32/tup-v0.7.7-8-gf77dbd4.zip and let me know if that helps? I was only able to get clang working as a compiler (ie: clang -c foo.c -o foo.o), but I couldn't get it to link anything even without tup in the mix. -Mike -- -- tup-users mailing list email: [email protected] unsubscribe: [email protected] options: http://groups.google.com/group/tup-users?hl=en --- You received this message because you are subscribed to the Google Groups "tup-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
