Closed
Bug 1489698
Opened 6 years ago
Closed 6 years ago
Split js/src/moz.build into multiple files
Categories
(Core :: JavaScript Engine, enhancement, P3)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: tcampbell, Assigned: tcampbell)
References
(Blocks 1 open bug)
Details
Attachments
(9 files, 6 obsolete files)
(deleted),
patch
|
froydnj
:
review+
tcampbell
:
checkin+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
froydnj
:
review+
tcampbell
:
checkin+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
froydnj
:
review+
jandem
:
review+
tcampbell
:
checkin+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
tcampbell
:
review+
tcampbell
:
checkin+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
froydnj
:
review+
tcampbell
:
checkin+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
Waldo
:
review+
froydnj
:
review+
tcampbell
:
checkin+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
froydnj
:
review+
jonco
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
froydnj
:
review+
luke
:
review+
|
Details | Diff | Splinter Review |
The jit directory is a large amount of moz.build and it doesn't seem unreasonable to build as a separate group of UNIFIED_SOURCES.
Proposal:
- Add js/src/jit/moz.build for JIT files
- Move general CXXFLAGS to js-cxxflags.mozbuild and allow js/src, js/src/jit, js/src/shell to all share
- Same DEFINES to js-config.mozbuild for same build files
Assignee | ||
Comment 1•6 years ago
|
||
There seems to be some interest (at least from :waldo) about splitting off more than just JIT. Will post patches next week and we can discuss.
Summary: Use own moz.build for js/src/jit directory → Split js/src/moz.build into multiple files
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 2•6 years ago
|
||
- Remove CFLAGS definitions since we don't build any non-C++. They were
misleading cruft, particularly references to fp:precise.
- Split fno-strict-aliasing from warnings list to make it clearer.
MozReview-Commit-ID: JND7TULAzLc
Assignee | ||
Comment 3•6 years ago
|
||
MozReview-Commit-ID: ImcZFI3YlVo
Assignee | ||
Comment 4•6 years ago
|
||
MozReview-Commit-ID: 3A0GNZ1hHeZ
Assignee | ||
Comment 5•6 years ago
|
||
MozReview-Commit-ID: zrKnXYGQ5X
Assignee | ||
Comment 6•6 years ago
|
||
MozReview-Commit-ID: FKWHR6qFDHv
Assignee | ||
Comment 7•6 years ago
|
||
MozReview-Commit-ID: 4o5bOeYM07O
Assignee | ||
Comment 8•6 years ago
|
||
MozReview-Commit-ID: 3NY33sYghGK
Assignee | ||
Comment 9•6 years ago
|
||
MozReview-Commit-ID: DgBvxMYIyUM
Assignee | ||
Comment 10•6 years ago
|
||
MozReview-Commit-ID: 3hfEx1hQ6jd
Comment 11•6 years ago
|
||
It will be highly beneficial if shell/moz.build can share js-config.mozbuild, as it's a constant source of errors that we forget to keep defines in js/src/shell/ in sync with defines in js/src/. Doing so might be part of your original statement of work; just wanted to emphasize it.
Assignee | ||
Comment 12•6 years ago
|
||
(In reply to Lars T Hansen [:lth] from comment #11)
> It will be highly beneficial if shell/moz.build can share
> js-config.mozbuild, as it's a constant source of errors that we forget to
> keep defines in js/src/shell/ in sync with defines in js/src/. Doing so
> might be part of your original statement of work; just wanted to emphasize
> it.
Yep, the "Use js-*.mozbuild in js/src subdirectories" patch makes sure to cover those cases.
Assignee | ||
Comment 13•6 years ago
|
||
sfink, are you able to review this sort of thing or is this a build-peer matter?
Flags: needinfo?(sphink)
Comment 14•6 years ago
|
||
(In reply to Ted Campbell [:tcampbell] from comment #13)
> sfink, are you able to review this sort of thing or is this a build-peer
> matter?
It feels like build-peer territory to me.
Flags: needinfo?(sphink)
Assignee | ||
Updated•6 years ago
|
Attachment #9007494 -
Flags: review?(core-build-config-reviews)
Assignee | ||
Updated•6 years ago
|
Attachment #9007495 -
Flags: review?(core-build-config-reviews)
Assignee | ||
Updated•6 years ago
|
Attachment #9007496 -
Flags: review?(core-build-config-reviews)
Assignee | ||
Updated•6 years ago
|
Attachment #9007497 -
Flags: review?(core-build-config-reviews)
Assignee | ||
Updated•6 years ago
|
Attachment #9007498 -
Flags: review?(core-build-config-reviews)
Assignee | ||
Updated•6 years ago
|
Attachment #9007498 -
Flags: review?(core-build-config-reviews)
Assignee | ||
Comment 15•6 years ago
|
||
Requested build-peer review for the cleanup patches. If they are happy with the approach, we can look at reviewing the actual per-directory splits.
Comment 16•6 years ago
|
||
Comment on attachment 9007494 [details] [diff] [review]
Cleanup CXXFLAGS in js/src/moz.build
Review of attachment 9007494 [details] [diff] [review]:
-----------------------------------------------------------------
We apparently do build some C files. :)
::: js/src/moz.build
@@ -751,5 @@
>
> if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
> - # Prevent floating point errors caused by VC++ optimizations
> - # XXX We should add this to CXXFLAGS, too?
> - CFLAGS += ['-fp:precise']
Huh, we have dtoa.c, but we apparently build it via #include...wonder if that causes issues...
We have some vtune source files, would this matter there?
Attachment #9007494 -
Flags: review?(core-build-config-reviews)
Comment 17•6 years ago
|
||
Comment on attachment 9007495 [details] [diff] [review]
Move js/src/moz.build defines to own file
Review of attachment 9007495 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with the changes below.
::: js/src/js-config.mozbuild
@@ +31,5 @@
> + DEFINES['JS_HAS_CTYPES'] = True
> + if not CONFIG['MOZ_SYSTEM_FFI']:
> + DEFINES['FFI_BUILDING'] = True
> + DEFINES['DLL_PREFIX'] = '"%s"' % CONFIG['DLL_PREFIX']
> + DEFINES['DLL_SUFFIX'] = '"%s"' % CONFIG['DLL_SUFFIX']
These two got removed in bug 1399877, please remove them here as well.
Attachment #9007495 -
Flags: review?(core-build-config-reviews) → review+
Updated•6 years ago
|
Attachment #9007496 -
Flags: review?(core-build-config-reviews) → review+
Updated•6 years ago
|
Attachment #9007497 -
Flags: review?(core-build-config-reviews) → review+
Updated•6 years ago
|
Attachment #9007498 -
Flags: review+
Comment 18•6 years ago
|
||
Comment on attachment 9007494 [details] [diff] [review]
Cleanup CXXFLAGS in js/src/moz.build
Review of attachment 9007494 [details] [diff] [review]:
-----------------------------------------------------------------
tcampbell and I worked out the differences on IRC. Long story short, fp:precise is the default nowadays and is likely to remain so.
Attachment #9007494 -
Flags: review+
Assignee | ||
Comment 19•6 years ago
|
||
Comment on attachment 9007497 [details] [diff] [review]
Use js-*.mozbuild in js/src subdirectories
This patch tweaks the js/src/fuzz-tests/moz.build file so I thought I'd make sure you are aware.
Attachment #9007497 -
Flags: feedback?(choller)
Assignee | ||
Comment 20•6 years ago
|
||
Attachment #9009717 -
Flags: review+
Assignee | ||
Updated•6 years ago
|
Attachment #9007495 -
Attachment is obsolete: true
Assignee | ||
Comment 21•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Attachment #9007500 -
Attachment is obsolete: true
Assignee | ||
Updated•6 years ago
|
Attachment #9009718 -
Attachment description: Rebase past Bug 1481097. → Bug 1489698 - Add moz.build for js/src/builtin
Assignee | ||
Comment 22•6 years ago
|
||
Comment on attachment 9009717 [details] [diff] [review]
Move js/src/moz.build defines to own file
Rebase past Bug 1399877. Carrying r=froydnj from Comment 17
Attachment #9009717 -
Attachment description: Rebase past Bug 1399877. Carrying r=froydnj from Comment 17. → Move js/src/moz.build defines to own file
Assignee | ||
Updated•6 years ago
|
Attachment #9009718 -
Attachment description: Bug 1489698 - Add moz.build for js/src/builtin → Add moz.build for js/src/builtin
Comment 23•6 years ago
|
||
Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e36de0f10e7f
Cleanup CXXFLAGS in js/src/moz.build. r=froydnj
https://hg.mozilla.org/integration/mozilla-inbound/rev/aeacff3b80fc
Move js/src/moz.build defines to own file. r=froydnj
https://hg.mozilla.org/integration/mozilla-inbound/rev/b5859f2671a8
Move js/src/moz.build CXXFLAGS to own file. r=froydnj
https://hg.mozilla.org/integration/mozilla-inbound/rev/725fbb08ff83
Use js-*.mozbuild in js/src subdirectories. r=froydnj
Assignee | ||
Comment 24•6 years ago
|
||
Landing the cleanup first. Individual directories can come as js-peers approve.
Keywords: leave-open
Comment 25•6 years ago
|
||
Comment on attachment 9007497 [details] [diff] [review]
Use js-*.mozbuild in js/src subdirectories
Looks good to me and shouldn't cause any issues as long as try is also happy. Thanks for keeping me in the loop.
Attachment #9007497 -
Flags: feedback?(choller) → feedback+
Assignee | ||
Comment 26•6 years ago
|
||
jsapi-tests is hitting linkage problems on Windows =\. I think I need to explictly add back |DEFINES['EXPORT_JS_API'] = True|.
Comment 27•6 years ago
|
||
Backed out for spidermonkey failures
Backout: https://hg.mozilla.org/integration/mozilla-inbound/rev/8a6cd52c69c74a8769f8d45441498fdcaee5aca1
Failure push: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=725fbb08ff83be7163a180d1bb47fd2aa1275756&selectedJob=199773065
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=199773065&repo=mozilla-inbound&lineNumber=2665
mozmake[3]: *** [z:/task_1537211408/src/config/rules.mk:1123: Unified_cpp_js_src_jsapi-tests2.obj] Error 2
Unified_cpp_js_src_shell0.cpp
z:\task_1537211408\src\js\src\vm/Runtime.h(83): error C2220: warning treated as error - no 'object' file generated
z:\task_1537211408\src\js\src\vm/Runtime.h(83): warning C4273: 'js::ReportOutOfMemory': inconsistent dll linkage
Z:\task_1537211408\src\obj-spider\dist\include\js/AllocPolicy.h(57): note: see previous definition of 'ReportOutOfMemory'
z:\task_1537211408\src\js\src\vm/Runtime.h(93): warning C4273: 'js::ReportOverRecursed': inconsistent dll linkage
z:\task_1537211408\src\js\src\jsfriendapi.h(234): note: see previous definition of 'ReportOverRecursed'
mozmake[3]: *** [z:/task_1537211408/src/config/rules.mk:1123: Unified_cpp_js_src_shell0.obj] Error 2
mozmake[3]: Leaving directory 'Z:/task_1537211408/src/obj-spider/js/src/shell'
mozmake[2]: *** [z:/task_1537211408/src/config/recurse.mk:74: js/src/shell/target] Error 2
Unified_cpp_js_src_jsapi-tests3.cpp
z:\task_1537211408\src\js\src\vm/Runtime.h(83): error C2220: warning treated as error - no 'object' file generated
z:\task_1537211408\src\js\src\vm/Runtime.h(83): warning C4273: 'js::ReportOutOfMemory': inconsistent dll linkage
Z:\task_1537211408\src\obj-spider\dist\include\js/AllocPolicy.h(57): note: see previous definition of 'ReportOutOfMemory'
z:\task_1537211408\src\js\src\vm/Runtime.h(93): warning C4273: 'js::ReportOverRecursed': inconsistent dll linkage
z:\task_1537211408\src\js\src\jsfriendapi.h(234): note: see previous definition of 'ReportOverRecursed'
mozmake[3]: *** [z:/task_1537211408/src/config/rules.mk:1123: Unified_cpp_js_src_jsapi-tests3.obj] Error 2
mozmake[3]: Leaving directory 'Z:/task_1537211408/src/obj-spider/js/src/jsapi-tests'
mozmake[2]: *** [z:/task_1537211408/src/config/recurse.mk:74: js/src/jsapi-tests/target] Error 2
mozmake[2]: Leaving directory 'Z:/task_1537211408/src/obj-spider'
mozmake[1]: *** [z:/task_1537211408/src/config/recurse.mk:34: compile] Error 2
mozmake[1]: Leaving directory 'Z:/task_1537211408/src/obj-spider'
mozmake: *** [z:/task_1537211408/src/config/rules.mk:432: default] Error 2
mozmake: Leaving directory 'Z:/task_1537211408/src/obj-spider'
Traceback (most recent call last):
File "./src/js/src/devtools/automation/autospider.py", line 413, in <module>
run_command('%s -w %s' % (MAKE, MAKEFLAGS), shell=True, check=True)
File "./src/js/src/devtools/automation/autospider.py", line 341, in run_command
raise subprocess.CalledProcessError(status, command, output=stderr)
subprocess.CalledProcessError: Command 'mozmake -w -j6' returned non-zero exit status 2
+ BUILD_STATUS=1
Flags: needinfo?(tcampbell)
Assignee | ||
Comment 28•6 years ago
|
||
Put the EXPORT_JS_API defines back. They are weird but currently needed to build.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=680507faab23893852445fb9e2b6483f37e565b3
Attachment #9007497 -
Attachment is obsolete: true
Flags: needinfo?(tcampbell)
Attachment #9010056 -
Flags: review?(nfroyd)
Updated•6 years ago
|
Attachment #9010056 -
Flags: review?(nfroyd) → review+
Comment 29•6 years ago
|
||
Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/caa56a2cab83
Cleanup CXXFLAGS in js/src/moz.build. r=froydnj
https://hg.mozilla.org/integration/mozilla-inbound/rev/6a27ee7d892b
Move js/src/moz.build defines to own file. r=froydnj
https://hg.mozilla.org/integration/mozilla-inbound/rev/56d5a9b4eb9d
Move js/src/moz.build CXXFLAGS to own file. r=froydnj
https://hg.mozilla.org/integration/mozilla-inbound/rev/b883684d4ee6
Use js-*.mozbuild in js/src subdirectories. r=froydnj
Comment 30•6 years ago
|
||
bugherder |
Assignee | ||
Comment 31•6 years ago
|
||
Notes to self: Patches for actual per-directory moz.build need to be rebased and perf-tested (sanity check). Review from both a build peer and js peer is a good idea.
Assignee | ||
Comment 32•6 years ago
|
||
Comment on attachment 9009718 [details] [diff] [review]
Add moz.build for js/src/builtin
This is super busted on Windows as we wind up with js/src/builtin/String.h on the search path as string.h (case insensitivity) and the standard library tries to use it...
Comment 33•6 years ago
|
||
Comment on attachment 9009718 [details] [diff] [review]
Add moz.build for js/src/builtin
Review of attachment 9009718 [details] [diff] [review]:
-----------------------------------------------------------------
FWIW, I personally would not mind if we needed to #include "js/src/builtin/String.h", even if we only changed includes incrementally as needed for filename collisions. (Or some other include path would be ok too, though I'd rather not conflate "js/foo.h" coming from js/public/foo.h with "js/builtin/foo.h" coming from js/src/builtin/foo.h" -- at least not until we eliminate all js/src/*.h files.)
But that might involve fixing up check_spidermonkey_style.py, so perhaps renaming the file is the path of least resistance for now?
Assignee | ||
Comment 34•6 years ago
|
||
Comment on attachment 9007498 [details] [diff] [review]
Add moz.build for js/src/jit
Disassembler / BaselineCompiler-x mentions will be removed in the rebase.
Attachment #9007498 -
Flags: review?(jdemooij)
Assignee | ||
Comment 35•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Attachment #9020016 -
Flags: review?(nfroyd)
Attachment #9020016 -
Flags: review?(jwalden+bmo)
Comment 36•6 years ago
|
||
Comment on attachment 9007498 [details] [diff] [review]
Add moz.build for js/src/jit
Review of attachment 9007498 [details] [diff] [review]:
-----------------------------------------------------------------
Nice.
Attachment #9007498 -
Flags: review?(jdemooij) → review+
Comment 37•6 years ago
|
||
Comment on attachment 9020016 [details] [diff] [review]
Add moz.build for js/src/frontend
Review of attachment 9020016 [details] [diff] [review]:
-----------------------------------------------------------------
\o/
Attachment #9020016 -
Flags: review?(nfroyd) → review+
Comment 38•6 years ago
|
||
Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a17dfbac6b10
Add moz.build for js/src/jit. r=jandem,froydnj
Comment 39•6 years ago
|
||
bugherder |
Updated•6 years ago
|
Attachment #9020016 -
Flags: review?(jwalden+bmo) → review+
Comment 40•6 years ago
|
||
(In reply to Steve Fink [:sfink] [:s:] (PTO Nov 5-16) from comment #33)
> FWIW, I personally would not mind if we needed to #include
> "js/src/builtin/String.h", even if we only changed includes incrementally as
> needed for filename collisions.
YES! Having to think about how to #include stuff is stupid, and topsrcdir-relative paths are *the* one thing that is immediately blindingly obvious and clear and eliminates all need to Think (other than whether the file in question was explicitly exported to the includedir -- which explicit export still seems like a good thing to me).
> (Or some other include path would be ok too,
> though I'd rather not conflate "js/foo.h" coming from js/public/foo.h with
> "js/builtin/foo.h" coming from js/src/builtin/foo.h" -- at least not until
> we eliminate all js/src/*.h files.)
NO! Changing one complicated non-obvious scheme is basically meaningless. :-)
But yes, carry on with whatever here that's easy. :-)
Assignee | ||
Comment 41•6 years ago
|
||
The String.h problem is that *ours* get's included by msvc's other headers. That doesn't get solved by more-qualified include paths in our code.
Comment 42•6 years ago
|
||
Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/93ecf65646b9
Add moz.build for js/src/frontend. r=waldo,froydnj
Comment 43•6 years ago
|
||
(In reply to Ted Campbell [:tcampbell] from comment #41)
> The String.h problem is that *ours* get's included by msvc's other headers.
> That doesn't get solved by more-qualified include paths in our code.
It does if you remove the directory containing it from the include paths.
Comment 44•6 years ago
|
||
bugherder |
Assignee | ||
Updated•6 years ago
|
Attachment #9007499 -
Attachment is obsolete: true
Assignee | ||
Updated•6 years ago
|
Attachment #9007494 -
Flags: checkin+
Assignee | ||
Updated•6 years ago
|
Attachment #9007496 -
Flags: checkin+
Assignee | ||
Updated•6 years ago
|
Attachment #9007498 -
Flags: checkin+
Assignee | ||
Updated•6 years ago
|
Attachment #9009717 -
Flags: checkin+
Assignee | ||
Updated•6 years ago
|
Attachment #9010056 -
Flags: checkin+
Assignee | ||
Updated•6 years ago
|
Attachment #9020016 -
Flags: checkin+
Assignee | ||
Comment 45•6 years ago
|
||
Attachment #9021891 -
Flags: review?(nfroyd)
Attachment #9021891 -
Flags: review?(jcoppeard)
Assignee | ||
Updated•6 years ago
|
Attachment #9007501 -
Attachment is obsolete: true
Assignee | ||
Comment 46•6 years ago
|
||
Attachment #9021892 -
Flags: review?(nfroyd)
Attachment #9021892 -
Flags: review?(luke)
Assignee | ||
Updated•6 years ago
|
Attachment #9007502 -
Attachment is obsolete: true
Updated•6 years ago
|
Attachment #9021892 -
Flags: review?(luke) → review+
Comment 47•6 years ago
|
||
Comment on attachment 9021891 [details] [diff] [review]
Add moz.build for js/src/gc
Review of attachment 9021891 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/gc/moz.build
@@ +43,5 @@
> + 'WeakMapPtr.cpp',
> + 'Zone.cpp',
> +]
> +
> +# StoreBuffer.cpp cannot be built in unified because its template
Nit (this is preexisting though, so...): "...in unified mode"
Attachment #9021891 -
Flags: review?(nfroyd) → review+
Updated•6 years ago
|
Attachment #9021892 -
Flags: review?(nfroyd) → review+
Comment 48•6 years ago
|
||
Comment on attachment 9021891 [details] [diff] [review]
Add moz.build for js/src/gc
Review of attachment 9021891 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM.
Attachment #9021891 -
Flags: review?(jcoppeard) → review+
Comment 49•6 years ago
|
||
Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/298e3182979c
Add moz.build for js/src/gc. r=jonco,froydnj
https://hg.mozilla.org/integration/mozilla-inbound/rev/520d47760632
Add moz.build for js/src/wasm. r=luke,froydnj
Comment 50•6 years ago
|
||
bugherder |
Assignee | ||
Comment 51•6 years ago
|
||
Main cleanups landed and a number of subdirectories files added. I don't have immediate plans to tackle other directories.
You need to log in
before you can comment on or make changes to this bug.
Description
•