Closed Bug 1598507 Opened 11 months ago Closed 10 months ago

Non-unified builds (FPUF=1 set manually) don't work with my clang

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: Waldo, Assigned: Waldo)

Details

Attachments

(1 file)

No description provided.
Assignee: nobody → jwalden
Pushed by jwalden@mit.edu:
https://hg.mozilla.org/integration/autoland/rev/0257181c4fe2
Fix nonunified builds.  r=sfink

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:Waldo, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(jwalden)

So:

[task 2019-12-07T05:57:40.874Z] In file included from Unified_cpp_js_src_shell0.cpp:2:
[task 2019-12-07T05:57:40.874Z] In file included from z:/task_1575697319/src/js/src/shell/OSObject.cpp:33:
[task 2019-12-07T05:57:40.874Z] In file included from z:/task_1575697319/src/js/src\shell/jsshell.h:17:
[task 2019-12-07T05:57:40.874Z] In file included from z:/task_1575697319/src/js/src\builtin/MapObject.h:11:
[task 2019-12-07T05:57:40.874Z] In file included from z:/task_1575697319/src/js/src\vm/GlobalObject.h:32:
[task 2019-12-07T05:57:40.874Z] z:/task_1575697319/src/js/src\vm/JSContext.h(823,3): error: attribute 'dllexport' cannot be applied to member of 'dllexport' class
[task 2019-12-07T05:57:40.874Z]   JS_FRIEND_API size_t
[task 2019-12-07T05:57:40.874Z]   ^
[task 2019-12-07T05:57:40.874Z] z:/task_1575697319/src/js/src\jstypes.h(52,25): note: expanded from macro 'JS_FRIEND_API'
[task 2019-12-07T05:57:40.874Z] #  define JS_FRIEND_API MOZ_EXPORT
[task 2019-12-07T05:57:40.874Z]                         ^
[task 2019-12-07T05:57:40.874Z] Z:/task_1575697319/src/obj-spider/dist/include/mozilla/Types.h(41,33): note: expanded from macro 'MOZ_EXPORT'
[task 2019-12-07T05:57:40.874Z] #  define MOZ_EXPORT __declspec(dllexport)
[task 2019-12-07T05:57:40.874Z]                                 ^
[task 2019-12-07T05:57:40.874Z] z:/task_1575697319/src/js/src\vm/JSContext.h(154,8): note: previous attribute is here
[task 2019-12-07T05:57:40.874Z] struct JS_PUBLIC_API JSContext : public JS::RootingContext,
[task 2019-12-07T05:57:40.874Z]        ^
[task 2019-12-07T05:57:40.874Z] z:/task_1575697319/src/js/src\jstypes.h(50,25): note: expanded from macro 'JS_PUBLIC_API'
[task 2019-12-07T05:57:40.874Z] #  define JS_PUBLIC_API MOZ_EXPORT
[task 2019-12-07T05:57:40.874Z]                         ^
[task 2019-12-07T05:57:40.874Z] Z:/task_1575697319/src/obj-spider/dist/include/mozilla/Types.h(41,33): note: expanded from macro 'MOZ_EXPORT'
[task 2019-12-07T05:57:40.874Z] #  define MOZ_EXPORT __declspec(dllexport)
[task 2019-12-07T05:57:40.874Z]                                 ^
[task 2019-12-07T05:57:40.874Z] In file included from Unified_cpp_js_src_shell0.cpp:2:
[task 2019-12-07T05:57:40.874Z] In file included from z:/task_1575697319/src/js/src/shell/OSObject.cpp:33:
[task 2019-12-07T05:57:40.874Z] In file included from z:/task_1575697319/src/js/src\shell/jsshell.h:17:
[task 2019-12-07T05:57:40.874Z] In file included from z:/task_1575697319/src/js/src\builtin/MapObject.h:11:
[task 2019-12-07T05:57:40.874Z] In file included from z:/task_1575697319/src/js/src\vm/GlobalObject.h:32:
[task 2019-12-07T05:57:40.874Z] z:/task_1575697319/src/js/src\vm/JSContext.h(837,3): error: attribute 'dllexport' cannot be applied to member of 'dllexport' class
[task 2019-12-07T05:57:40.874Z]   JS_FRIEND_API void checkMallocGCPressure(void* p);
[task 2019-12-07T05:57:40.874Z]   ^
[task 2019-12-07T05:57:40.874Z] z:/task_1575697319/src/js/src\jstypes.h(52,25): note: expanded from macro 'JS_FRIEND_API'
[task 2019-12-07T05:57:40.874Z] #  define JS_FRIEND_API MOZ_EXPORT
[task 2019-12-07T05:57:40.874Z]                         ^
[task 2019-12-07T05:57:40.874Z] Z:/task_1575697319/src/obj-spider/dist/include/mozilla/Types.h(41,33): note: expanded from macro 'MOZ_EXPORT'
[task 2019-12-07T05:57:40.874Z] #  define MOZ_EXPORT __declspec(dllexport)
[task 2019-12-07T05:57:40.874Z]                                 ^
[task 2019-12-07T05:57:40.874Z] z:/task_1575697319/src/js/src\vm/JSContext.h(154,8): note: previous attribute is here
[task 2019-12-07T05:57:40.874Z] struct JS_PUBLIC_API JSContext : public JS::RootingContext,
[task 2019-12-07T05:57:40.874Z]        ^
[task 2019-12-07T05:57:40.874Z] z:/task_1575697319/src/js/src\jstypes.h(50,25): note: expanded from macro 'JS_PUBLIC_API'
[task 2019-12-07T05:57:40.874Z] #  define JS_PUBLIC_API MOZ_EXPORT
[task 2019-12-07T05:57:40.874Z]                         ^
[task 2019-12-07T05:57:40.874Z] Z:/task_1575697319/src/obj-spider/dist/include/mozilla/Types.h(41,33): note: expanded from macro 'MOZ_EXPORT'
[task 2019-12-07T05:57:40.874Z] #  define MOZ_EXPORT __declspec(dllexport)
[task 2019-12-07T05:57:40.874Z]                                 ^

This could be solved by removing the JS_FRIEND_API from these member functions. But then I start wondering, isn't marking the entire class as public/friend going to mean every single function in it is going to be exported at library level? That can't possibly be the right action to take...can it?

This patch is sort of mostly fine, if I remove the redundant JS_FRIEND_API on the member functions, I expect. But if we have really managed to slide into exporting every single member function in JSContext, it feels like something has gone terribly wrong somewhere and we should be going home and rethinking our lives.

Flags: needinfo?(jwalden)
Priority: -- → P1

https://treeherder.mozilla.org/#/jobs?repo=try&selectedJob=280776211&revision=7568dc29d8cfd5918d7bb00524147c074ca382af indicates that this patch should be good to land, roughly shortly -- probably because I did end up un-publicking those member functions in JSContext. Will land once those prior patches are landed, just in case one of them is the cause of passingness and un-publicking happened not to be.

Pushed by jwalden@mit.edu:
https://hg.mozilla.org/integration/autoland/rev/39780bffc015
Fix nonunified builds.  r=sfink
Status: NEW → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
You need to log in before you can comment on or make changes to this bug.