On 10/29/12 7:17 PM, Ehsan Akhgari wrote:
On 2012-10-29 9:11 PM, Gregory Szorc wrote:
On 10/29/12 5:52 PM, Robert O'Callahan wrote:
On Tue, Oct 30, 2012 at 1:13 PM, Nicholas Nethercote
<n.netherc...@gmail.com
wrote:

"#pragma once does have one drawback (other than being non-standard)
and that is if you have the same file in different locations (we have
this because our build system copies files around) then the compiler
will think these are different files"

Is that a problem for Mozilla code?


It could be. On Windows files get copied from the source directory to
dist/include. So it seems to me that if "." is on the include path
before
dist/include, it would be easy for some files to be included twice.

In my ideal world, all include paths (actually, all paths given to the
compiler) are absolute, not relative. This is ideal because it saves the
build system from requiring execution within a specific directory. This
simplifies implementation and avoids ambiguity. It also has the nice
side-effect that you can execute compiler commands from anywhere and it
just works.

So, if part of this transition is normalizing all include paths to
absolute paths, +1 from me.

How much work is that going to be?  The work involved is not clear to me.

I'm not sure. It might be easier to wait until the new build system frontend files land and to convert include paths when we port C/C++ compilation to the new world: once we dynamically create make files, it will be much easier to normalize everything to absolute paths.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to