Straighten up zlib linkage wrt shared js and system zlib

RESOLVED FIXED in mozilla28

Status

()

Core
Build Config
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: glandium, Assigned: glandium)

Tracking

Trunk
mozilla28
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment)

Comment hidden (empty)
(Assignee)

Comment 1

4 years ago
Created attachment 8336780 [details] [diff] [review]
Straighten up zlib linkage wrt shared js and system zlib
Attachment #8336780 - Flags: review?(gps)

Comment 2

4 years ago
Comment on attachment 8336780 [details] [diff] [review]
Straighten up zlib linkage wrt shared js and system zlib

Review of attachment 8336780 [details] [diff] [review]:
-----------------------------------------------------------------

I don't grok the C++ defines bit. I'd feel better if you got a supplemental review from someone who does. But if it's really trivial, I trust you.

::: configure.in
@@ +7783,5 @@
> +  ZLIB_IN_MOZGLUE=1
> +  AC_DEFINE(ZLIB_IN_MOZGLUE)
> +  AC_SUBST(ZLIB_IN_MOZGLUE)
> +  # To pass to js/src
> +  export ZLIB_IN_MOZGLUE

Don't we usually do the export below, immediately before the AC_OUTPUT_SUBDIRS?

::: modules/zlib/src/moz.build
@@ +30,5 @@
>      'zutil.c',
>  ]
> +
> +if CONFIG['ZLIB_IN_MOZGLUE']:
> +    DEFINES['IMPL_MFBT'] = True

I don't quite follow this. But I'll trust you.

::: modules/zlib/src/mozzconf.h
@@ +8,5 @@
>  
> +#include "mozilla/Types.h"
> +
> +#if defined(ZLIB_IN_MOZGLUE)
> +#define ZEXTERN MFBT_API

And this.
Attachment #8336780 - Flags: review?(gps) → review+
(Assignee)

Updated

4 years ago
Attachment #8336780 - Flags: review?(ted)
Comment on attachment 8336780 [details] [diff] [review]
Straighten up zlib linkage wrt shared js and system zlib

Review of attachment 8336780 [details] [diff] [review]:
-----------------------------------------------------------------

::: configure.in
@@ +7778,5 @@
> +fi
> +AC_SUBST(GKMEDIAS_SHARED_LIBRARY)
> +
> +if test -z "$MOZ_NATIVE_ZLIB"; then
> +if test -n "$JS_SHARED_LIBRARY" -o "$GKMEDIAS_SHARED_LIBRARY"; then

Couldn't you just combine these two if statements?

@@ +7781,5 @@
> +if test -z "$MOZ_NATIVE_ZLIB"; then
> +if test -n "$JS_SHARED_LIBRARY" -o "$GKMEDIAS_SHARED_LIBRARY"; then
> +  ZLIB_IN_MOZGLUE=1
> +  AC_DEFINE(ZLIB_IN_MOZGLUE)
> +  AC_SUBST(ZLIB_IN_MOZGLUE)

nit: you have the AC_SUBST inside the if block here but outside elsewhere. (Not that it really matters where it goes.)
Attachment #8336780 - Flags: review?(ted) → review+
(Assignee)

Comment 4

4 years ago
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #3)
> > +if test -z "$MOZ_NATIVE_ZLIB"; then
> > +if test -n "$JS_SHARED_LIBRARY" -o "$GKMEDIAS_SHARED_LIBRARY"; then
> 
> Couldn't you just combine these two if statements?

I could, but that would be either
  if test -z "$MOZ_NATIVE_ZLIB" && test -n "$JS_SHARED_LIBRARY" -o "$GKMEDIAS_SHARED_LIBRARY"; then
or
  if test -z "$MOZ_NATIVE_ZLIB" -a \( -n "$JS_SHARED_LIBRARY" -o "$GKMEDIAS_SHARED_LIBRARY" \); then

pick your poison.
I guess they're both sort of horrible. Feel free to keep it as it is or pick one of those.
(Assignee)

Comment 7

4 years ago
Backed out for ASAN and windows bustage.
https://hg.mozilla.org/integration/mozilla-inbound/rev/e668d88804d1
https://hg.mozilla.org/mozilla-central/rev/a6c1abbdf6f9
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28

Updated

4 years ago
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.