expleeve / gyp

Automatically exported from code.google.com/p/gyp
0 stars 0 forks source link

*.s (lower case) do not generate *.o.d files on linux #297

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a gyp file with a *.s (lower case) file as a source file.
2. Generate *.ninja files.
3. Compile using ninja.
4. Do not modify the *.s file and compile again using ninja.

What is the expected output? What do you see instead?

The second compile should be a noop as no source files have changed. Instead, 
the second compile re-compiles the *.s.

When compiling *.s files, the *.o.d file generation (-MMD option) should be 
omitted. Otherwise, underlying build tools (like ninja) that consider a target 
dirty if the expected *.o.d file does not exist will always rebuild *.s files. 
This behavior appears to be linux specific and does not match Mac OS.

https://github.com/martine/ninja/pull/407

Note that for *.S (capital S) on linux *.o.d files are generated so the current 
behavior should not be changed for them. These commands provide an overview of 
the compiler behavior that I am seeing.

~$ mkdir test
~$ cd test/
~/test$ touch test.s  # empty file
~/test$ clang -MMD test.s -MF test.o.d -c
clang: warning: argument unused during compilation: '-MMD'
clang: warning: argument unused during compilation: '-MF test.o.d'
~/test$ ls
test.o  test.s
~/test$ rm -rf *
~/test$ touch test.S  # empty file
~/test$ clang -MMD test.S -MF test.o.d -c
~/test$ ls
test.o  test.o.d  test.S

What version of the product are you using? On what operating system?

clang 3.1 build from RELEASE_31 on Debian Squeeze (stable). Nico reports the 
gcc on linux matches this behavior (see ninja-build thread below).

$ clang --version
clang version 3.1 (tags/RELEASE_31/final 162024)
Target: x86_64-unknown-linux-gnu
Thread model: posix

Please provide any additional information below.

See this thread on the ninja list for more info.

https://groups.google.com/d/topic/ninja-build/ERNFVNF2hR8/discussion

Original issue reported on code.google.com by ahochh...@samegoal.com on 20 Sep 2012 at 3:18

GoogleCodeExporter commented 9 years ago
This issue can be closed:

http://code.google.com/p/gyp/source/detail?r=1521

Original comment by ahochh...@samegoal.com on 18 Oct 2012 at 7:50

GoogleCodeExporter commented 9 years ago
You're fast!

Original comment by thakis@chromium.org on 18 Oct 2012 at 7:51