Closed Bug 1397764 Opened 3 years ago Closed 3 years ago

Allow to set BINDGEN_CFLAGS from moz.confgure (or autoconf)

Categories

(Firefox Build System :: General, enhancement)

Unspecified
Android
enhancement
Not set

Tracking

(firefox57 wontfix, firefox58 fixed)

RESOLVED FIXED
mozilla58
Tracking Status
firefox57 --- wontfix
firefox58 --- fixed

People

(Reporter: m_kato, Assigned: m_kato)

References

(Blocks 1 open bug)

Details

(Whiteboard: [Stylo])

Attachments

(2 files)

Actually, BINDGEN_CFLAGS can set from environment value only.  But when building Fennec/Android, we want to generate BINDGEN_CFLAGS from autoconf or moz.configure.

So we should allow to set BINDGEN_CFLAGS from moz.confgure (or autoconf)

Ex, if we set it by mozconfigs, we need the following.

BINDGEN_CFLAGS="-I$topsrcdir/android-ndk/sources/cxx-stl/llvm-libc++/libcxx/include -I$topsrcdir/android-ndk/sources/android/support/include -I$topsrcdir/android-ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/include"
 
export BINDGEN_CFLAGS="$BINDGEN_CFLAGS -isystem $topsrcdir/android-ndk/platforms/android-9/arch-arm/usr/include --gcc-toolchain=$topsrcdir/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 -I$topsrcdir/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9/include -I$topsrcdir/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9/include-fixed"
+
Attachment #8913575 - Flags: review?(mh+mozilla) → review?(cmanchester)
Attachment #8913576 - Flags: review?(mh+mozilla) → review?(cmanchester)
Comment on attachment 8913575 [details]
Bug 1397764 - Part 1. Move STLPORT_CPPFLAGS to moz.configure.

https://reviewboard.mozilla.org/r/184952/#review191234
Attachment #8913575 - Flags: review?(cmanchester) → review+
Comment on attachment 8913576 [details]
Bug 1397764 - Part 2. Generate BINDGEN_CFLAGS for Android.

https://reviewboard.mozilla.org/r/184954/#review191636

::: build/moz.configure/android-ndk.configure:239
(Diff revision 1)
> +    if os.environ.get('BINDGEN_CFLAGS'):
> +        return

This isn't quite how we want to do this: `imply_option` (used below) forces a value to be set, but here we're alowing someone to override the value if they set `BINDGEN_CFLAGS` in their environment, so it's acting more like a default.

We want to implement this as a function that is used as a default for the `BINDGEN_CFLAGS` option instead. `build_backend_defaults` is an example of something similar.
Attachment #8913576 - Flags: review?(cmanchester)
Comment on attachment 8913576 [details]
Bug 1397764 - Part 2. Generate BINDGEN_CFLAGS for Android.

https://reviewboard.mozilla.org/r/184954/#review192894
Attachment #8913576 - Flags: review?(cmanchester) → review+
Pushed by m_kato@ga2.so-net.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/e3242e1acec0
Part 1. Move STLPORT_CPPFLAGS to moz.configure. r=chmanchester
https://hg.mozilla.org/integration/autoland/rev/247222cae0e8
Part 2. Generate BINDGEN_CFLAGS for Android. r=chmanchester
https://hg.mozilla.org/mozilla-central/rev/e3242e1acec0
https://hg.mozilla.org/mozilla-central/rev/247222cae0e8
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Assignee: nobody → m_kato
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.