Need specific order in generated OS_LIBS
Categories
(Firefox Build System :: General, enhancement, P1)
Tracking
(firefox70 fixed)
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: bugzilla, Assigned: bugzilla)
References
Details
Attachments
(1 file)
I have problem:
The launcher process needs to call RtlCaptureStackBackTrace
which is exported from ntdll.dll
. Unfortunately, the same function is also exported from kernel32.dll
but forwards to the implementation in ntdll.dll
.
Unfortunately the build system is linking the kernel32
variant of RtlCaptureStackBackTrace
into firefox.exe
instead of the ntdll
variant.
I cannot use the kernel32.dll
version because the code in question is running before kernel32.dll
has even been linked into the process.
With the MSVC linker, order is important, so if we were to specify ntdll.lib
ahead of kernel32.lib
, the linker would use the former.
I don't know whether lld
honors this or not. If so, then I need a way to be able to tell the build system that ntdll.lib
must be the first entry in OS_LIBS
(or at least must appear ahead of kernel32.lib
).
If not, I need to find some other way to tell the linker that RtlCaptureStackBackTrace
must come from ntdll.lib
and not kernel32.lib
Assignee | ||
Comment 1•5 years ago
|
||
Thanks to dmajor's hint on IRC, I have a working fix.
Assignee | ||
Comment 2•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=94cbe2be70db7cfa3a74985a2b8138d0c0684e6f
Assignee | ||
Comment 3•5 years ago
|
||
Since kernel32.lib is a defaultlib we do not need to explicitly include it
in the OS_LIBS list; the linker will implicitly added it to the end of the list.
In fact, its presence interferes with other explicitly added .lib files that
should take precedence.
Pushed by aklotz@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/753859ba84c2 Remove kernel32.lib from LIBS in old-configure.in; r=glandium
Comment 5•5 years ago
|
||
bugherder |
Description
•