Open Bug 1413755 Opened 2 years ago Updated 2 years ago

Consider using relative paths to specify the source files that should be built


(Firefox Build System :: General, enhancement)

Not set


(Not tracked)


(Reporter: jwatt, Unassigned)



(2 files)

Bug 648053 made us change from specifying the source file that is to be compiled using a relative path to an absolute path. That was to help Eclipse CDT indexing. Nowadays we have a build backend to generate Eclipse CDT projects, and besides that unified builds would have broken the Eclipse Build Output Parser mechanism.

Switching back to relative paths would make log files smaller and may be a step towards making our builds more CCACHE_BASEDIR friendly. Try looks happy enough:

There may be other places I'm unaware of that nowadays require absolute paths though.
Attached patch patchSplinter Review
The build system may well have changed sufficiently over the years that this is not the only change that would be required.
Attachment #8924370 - Flags: review?(core-build-config-reviews)
Comment on attachment 8924370 [details] [diff] [review]

We should probably just remove _VPATH_SRCS at this point and replace with $< where it's used, as it no longer seems to have any use.

Note that the non-unified files still have full paths (eg: jsarray.cpp), so you may still have the same caching issues with those if that's your end goal.
Attachment #8924370 - Flags: review?(core-build-config-reviews) → review+
Pushed by
Have the build system use relative paths to specify the source files that should be built. r=mshal
Backed out for static build bustage on Linux at chromium/sandbox/linux/bpf_dsl/ bad implicit conversion constructor for 'ConstBoolExprImpl':

Push with failures:
Failure log:
/builds/worker/workspace/build/src/security/sandbox/linux/../chromium/sandbox/linux/bpf_dsl/ error: bad implicit conversion constructor for 'ConstBoolExprImpl'
Flags: needinfo?(jwatt)
Attached file Build log snippet
I don't see why this change would cause the compilation of security/sandbox/chromium/sandbox/linux/bpf_dsl/ to change at all. The command from the log file - broken across multiple lines to make it easier to read - shows that no relative paths were used:

-std=gnu++11 -o bpf_dsl.o -c 
-include /builds/worker/workspace/build/src/config/gcc_hidden.h
-include /builds/worker/workspace/build/src/obj-firefox/mozilla-config.h
-Qunused-arguments -Qunused-arguments -Wall -Wc++11-compat -Wempty-body
-Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare
-Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings 
-Wno-invalid-offsetof -Wclass-varargs -Wloop-analysis -Wc++11-compat-pedantic 
-Wc++14-compat -Wc++14-compat-pedantic -Wc++1z-compat -Wcomma 
-Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion 
-Wno-inline-new-delete -Wno-error=deprecated-declarations 
-Wno-error=array-bounds -Wformat -Wno-gnu-zero-variadic-macro-arguments 
-Wformat-security -Wno-unknown-warning-option -Wno-return-type-c-linkage 
-fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections 
-fdata-sections -fno-exceptions -fno-math-errno -pthread 
-D_GLIBCXX_USE_CXX11_ABI=0 -pipe -g -Xclang -load -Xclang 
-Xclang -add-plugin -Xclang moz-check -Os -fno-omit-frame-pointer -Werror 
-Wno-shadow  -MD -MP -MF .deps/bpf_dsl.o.pp
Flags: needinfo?(jwatt)
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.