diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-04-12 15:42:45 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-04-13 16:06:00 +0900 |
commit | c37a357c13b399b79fb1ef197738f60cae472dbf (patch) | |
tree | 279ac6c7ce9a02a0d2fcd48e77bc42da1a8554c1 /common.mk | |
parent | 4ff3f205408ff8bb413d69151105d301858136ba (diff) |
include what you use.
This reverts commit 443389effc37308ce1a3c3a840082a344fc6af56.
This reverts commit d94960f22ec2de3a3855305cb51343806d2b46c7.
Inclusion of header files must be explicit. Every file shall directly
include what is necessary.
https://github.com/include-what-you-use/include-what-you-use says:
> When every file includes what it uses, then it is possible to edit any
> file and remove unused headers, without fear of accidentally breaking
> the upwards dependencies of that file. It also becomes easy to
> automatically track and update dependencies in the source code.
Though we don't use iwyu itself, the principle quoted above is a good
thing that we can agree.
Now that include guards were added to every and all of the headers
inside of our project this changeset does not increase compile time, at
least on my machine.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3023
Diffstat (limited to 'common.mk')
-rw-r--r-- | common.mk | 18 |
1 files changed, 1 insertions, 17 deletions
@@ -3878,6 +3878,7 @@ dir.$(OBJEXT): {$(VPATH)}3/variable.h dir.$(OBJEXT): {$(VPATH)}3/warning_push.h dir.$(OBJEXT): {$(VPATH)}3/xmalloc.h dir.$(OBJEXT): {$(VPATH)}assert.h +dir.$(OBJEXT): {$(VPATH)}builtin.h dir.$(OBJEXT): {$(VPATH)}backward/2/assume.h dir.$(OBJEXT): {$(VPATH)}backward/2/attributes.h dir.$(OBJEXT): {$(VPATH)}backward/2/bool.h @@ -3890,7 +3891,6 @@ dir.$(OBJEXT): {$(VPATH)}backward/2/r_cast.h dir.$(OBJEXT): {$(VPATH)}backward/2/rmodule.h dir.$(OBJEXT): {$(VPATH)}backward/2/stdalign.h dir.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h -dir.$(OBJEXT): {$(VPATH)}builtin.h dir.$(OBJEXT): {$(VPATH)}config.h dir.$(OBJEXT): {$(VPATH)}defines.h dir.$(OBJEXT): {$(VPATH)}dir.c @@ -5416,10 +5416,6 @@ explicit_bzero.$(OBJEXT): {$(VPATH)}3/compiler_is/sunpro.h explicit_bzero.$(OBJEXT): {$(VPATH)}3/compiler_since.h explicit_bzero.$(OBJEXT): {$(VPATH)}3/config.h explicit_bzero.$(OBJEXT): {$(VPATH)}3/dllexport.h -explicit_bzero.$(OBJEXT): {$(VPATH)}3/has/attribute.h -explicit_bzero.$(OBJEXT): {$(VPATH)}3/has/warning.h -explicit_bzero.$(OBJEXT): {$(VPATH)}3/token_paste.h -explicit_bzero.$(OBJEXT): {$(VPATH)}3/warning_push.h explicit_bzero.$(OBJEXT): {$(VPATH)}config.h explicit_bzero.$(OBJEXT): {$(VPATH)}explicit_bzero.c explicit_bzero.$(OBJEXT): {$(VPATH)}missing.h @@ -11782,10 +11778,6 @@ ruby-runner.$(OBJEXT): {$(VPATH)}3/compiler_is/msvc.h ruby-runner.$(OBJEXT): {$(VPATH)}3/compiler_is/sunpro.h ruby-runner.$(OBJEXT): {$(VPATH)}3/compiler_since.h ruby-runner.$(OBJEXT): {$(VPATH)}3/config.h -ruby-runner.$(OBJEXT): {$(VPATH)}3/has/attribute.h -ruby-runner.$(OBJEXT): {$(VPATH)}3/has/warning.h -ruby-runner.$(OBJEXT): {$(VPATH)}3/token_paste.h -ruby-runner.$(OBJEXT): {$(VPATH)}3/warning_push.h ruby-runner.$(OBJEXT): {$(VPATH)}config.h ruby-runner.$(OBJEXT): {$(VPATH)}ruby-runner.c ruby-runner.$(OBJEXT): {$(VPATH)}ruby-runner.h @@ -13089,10 +13081,6 @@ strlcat.$(OBJEXT): {$(VPATH)}3/compiler_is/sunpro.h strlcat.$(OBJEXT): {$(VPATH)}3/compiler_since.h strlcat.$(OBJEXT): {$(VPATH)}3/config.h strlcat.$(OBJEXT): {$(VPATH)}3/dllexport.h -strlcat.$(OBJEXT): {$(VPATH)}3/has/attribute.h -strlcat.$(OBJEXT): {$(VPATH)}3/has/warning.h -strlcat.$(OBJEXT): {$(VPATH)}3/token_paste.h -strlcat.$(OBJEXT): {$(VPATH)}3/warning_push.h strlcat.$(OBJEXT): {$(VPATH)}config.h strlcat.$(OBJEXT): {$(VPATH)}missing.h strlcat.$(OBJEXT): {$(VPATH)}strlcat.c @@ -13106,10 +13094,6 @@ strlcpy.$(OBJEXT): {$(VPATH)}3/compiler_is/sunpro.h strlcpy.$(OBJEXT): {$(VPATH)}3/compiler_since.h strlcpy.$(OBJEXT): {$(VPATH)}3/config.h strlcpy.$(OBJEXT): {$(VPATH)}3/dllexport.h -strlcpy.$(OBJEXT): {$(VPATH)}3/has/attribute.h -strlcpy.$(OBJEXT): {$(VPATH)}3/has/warning.h -strlcpy.$(OBJEXT): {$(VPATH)}3/token_paste.h -strlcpy.$(OBJEXT): {$(VPATH)}3/warning_push.h strlcpy.$(OBJEXT): {$(VPATH)}config.h strlcpy.$(OBJEXT): {$(VPATH)}missing.h strlcpy.$(OBJEXT): {$(VPATH)}strlcpy.c |