Граф коммитов

119 Коммитов

Автор SHA1 Сообщение Дата
Mike Hommey 441c1e30d4 Bug 1259382 - Make add_old_configure_assignment work like set_config, accepting both @depends functions and literal values for both arguments it takes. r=ted 2016-04-13 17:11:36 +09:00
Mike Hommey 6684d3c1ee Bug 1259382 - Make mozbuild.shellutil.quote more useful for e.g. creating printable command lines. r=ted 2016-04-13 17:11:36 +09:00
Mike Hommey 2c621f97c8 Bug 1264129 - Add verbosity for the shell and autoconf checks in moz.configure. r=gps
Also get an absolute path for the shell.
2016-04-13 10:06:52 +09:00
Mike Hommey c0808e5f6d Bug 1262087 - Make the @checking callback not alter the behavior for bools. r=chmanchester 2016-04-06 07:25:26 +09:00
Mike Hommey 6886f13b7d Bug 1262020 - Move --with-android-ndk, --with-android-toolchain and --with-android-gnu-compiler-version to moz.configure. r=nalexander 2016-04-06 07:25:13 +09:00
Mike Hommey 1d9ff89e0e Bug 1262019 - Make --with-gonk imply --enable-default-toolkit=cairo-gonk. r=chmanchester
This removes the need for a dummy `gonkdir` function for the
build_project != 'b2g' case.
2016-04-06 07:25:06 +09:00
Mike Hommey e6d52431b6 Bug 1261531 - Remove most obvious cases of useless AC_DEFINEs. r=chmanchester
- HW_THREADS doesn't appear to be doing anything.

- USE_ARM_KUSER is not used since bug 675078. This also removes the configure
  flag that sets it.

- HAVE_SETBUF and HAVE_SNPRINTF are leftover from bug 944935.

- MOZ_MEMORY_GONK is leftover from bug 804303.
2016-04-05 07:16:44 +09:00
Mike Hommey c25921b32d Bug 1261531 - Remove most obvious cases of useless AC_SUBSTs. r=chmanchester
- DEVELOPER_OPTIONS, INTEL_CC, INTEL_CXX, MOZ_ENABLE_QTMOBILITY,
  GTK_CONFIG are or even were never used outside configure.

- MOZ_PROFILELOCKING which gradually became a no-op over the years. This
  also removes the configure flag that sets it.

- XULRUNNER_STUB_NAME is xulrunner-only, and xulrunner is gone. This
  also removes the configure flag that sets it.

- The only use of MOZ_CAN_RUN_PROGRAMS was removed in bug 780561.

- AR_LIST and AR_DELETE have not been used since bug 584474.

- MOZ_COMPONENT_NSPR_LIBS is leftover from bug 1036894.

- MOZ_PNG_ARM_NEON_CHECK is not used since bug 980488.

- MOZ_WEBRTC_LEAKING_TESTS has been no-oped by bug 825510.

- VPX_NEED_OBJ_INT_EXTRACT and NO_INTEGRATED_AS_CFLAGS are not used since
  bug 1151175.

- WCHAR_CFLAGS is not used since bug 904985.
2016-04-05 07:16:44 +09:00
Mike Hommey 03275f034b Bug 1261285 - Properly remove the config.log logging handler before running old-configure. r=ted
Because closing the handler is not enough (it eventually reopens
itself), the dumping of config.log overwrites the file, and confuses
the process of reading it to dump it in the first place, showing
incomplete logs. The intent from the start was that nothing would be
logged in the FileHandler, so on top of closing it, actively remove it.
2016-04-05 07:16:44 +09:00
Mike Hommey 8155d8f286 Bug 1261235 - Handle non-ascii in configure logging. r=ted
When reading config.log, with old-configure output, we may get non-ascii
strings, but that currently fails because we're using plain open() to
read it. So use encoded_open() instead (which does the same job for
other files in the same script).

Because the build system can be encapsulated in mach, python configure
can have a pipe as stdout/stderr, and in that case, sys.stdout/stderr
have an ascii encoding, failing to print out anything that doesn't
fit in ascii, consequently failing to print the things we've read from
config.log. So reopen stdout and stderr with the right encoding in
the configure output handler.
2016-04-05 07:16:44 +09:00
Hector Zhao a408fabf31 Bug 1260427 - Additional nspr/nss related old_configure_options. r=glandium
MozReview-Commit-ID: Bre9H6hPlz5

--HG--
extra : transplant_source : %A7PE%AFh%A1%AA%7B%F8%B4%A0%08XA%1C%B6%AC1%CD%D9
2016-03-29 21:57:03 +08:00
Mike Hommey c12b02c70d Bug 1260647 - Unify cross-compilation setup, while moving some of it to moz.configure. r=ted
Gonk, Android, and the generic cross-compilation setup all were using a
different yet similar way to prefix the toolchain. The latter was even
wrong, since the target and target alias usually don't match actual
toolchain prefixes (which don't include the machine part of the target).
2016-04-01 09:43:26 +09:00
Mike Hommey 08b4bd78d9 Bug 1260639 - Log more information before starting old-configure. r=ted 2016-04-01 09:43:26 +09:00
Mike Hommey 74de434e68 Bug 1260636 - Add endianness to host and target information. r=ted
While in the vicinity, add support for sparc64.
2016-04-01 09:43:26 +09:00
Mike Hommey 1f729885a7 Bug 1260624 - Move CROSS_COMPILE to moz.configure. r=ted
Note that this removes force-setting cross_compiling to yes in
old-configure, which wasn't working because every AC_TRY_COMPILE
resets it with $ac_cv_prog_cc_cross or $ac_cv_prog_cxx_cross.
2016-04-01 09:43:26 +09:00
Mike Hommey f1ed025e8b Bug 1260066 - Don't allow to use sandbox primitives from anywhere but global scope and templates. r=nalexander
The initial goal of templates was to provide a way to write shorter
constructs for some generic tasks during configure. But the limitations
of the sandbox and the properties of templates made them used for more
general functions.

Consequently, this led to templates having to be available from
anywhere, which, in turn, led to difficult to introspect constructs.
With bug 1257823, we've made almost everything use set_config and
similar functions from the global scope, but we don't enforce that
those primitives are only used at the global scope.

This change does that: it enforces that primitives are only used at
the global scope. Or in templates.

Now, since templates were used for other purposes than generic uses
of other primitives, we now allow non-template functions to be declared.
Those can be used everywhere, but don't have access to the sandbox
primitives.
2016-03-30 07:08:00 +09:00
Mike Hommey a2652b3b0b Bug 1260066 - Move add_old_configure_arg to the global scope. r=nalexander
We've done this for set_config, set_define, imply_option, and
add_old_configure_assignment. Do it for add_old_configure_arg as well.
2016-03-30 07:07:57 +09:00
Mike Hommey 9bf72e6993 Bug 1256573 - Switch moz.configure to use @imports instead of @advanced. r=nalexander 2016-03-30 07:07:53 +09:00
Mike Hommey edcd74a9d7 Bug 1259381 - Move --with-ccache and --with-compiler-wrapper to moz.configure. r=chmanchester 2016-03-30 07:07:45 +09:00
Mike Hommey 6eee113ee8 Bug 1259960 - Make check_prog more flexible about the list of programs it will check. r=chmanchester 2016-03-30 07:07:42 +09:00
Mike Hommey 028ebf69ff Bug 1259960 - Make check_prog more flexible about the input it receives. r=chmanchester 2016-03-30 07:07:40 +09:00
Mike Hommey 18a002cd83 Bug 1259960 - Allow to pass a string to check_prog to describe what is being looked for. r=chmanchester
So far, we've been using the lowercase of the variable name, but it's
not enough for some special cases. Those special cases could do their
own business, but then, they'd have to duplicate 90% of check_prog,
which is less desirable.
2016-03-30 07:07:38 +09:00
Mike Hommey 29c3394b1b Bug 1259960 - s/DummyFunction/DependsFunction/. r=chmanchester
While DummyFunction is descriptive of what the instances are (and they
can't even be called), the various uses of isintance(obj, DummyFunction)
are kind of confusing, especially when they are in moz.configure land
(and this bug is about to add another one).
2016-03-30 07:07:37 +09:00
Mike Hommey 2baf0d3dc1 Bug 1257516 - Handle outputting the tail of config.log for old-configure failures from moz.configure. r=ted 2016-03-30 07:07:30 +09:00
Mike Hommey cbf367717b Bug 1257516 - Make check_prog opt-in to the queued debug log messages. r=ted 2016-03-30 07:07:13 +09:00
Mike Hommey a2c9191daf Bug 1257516 - Add a unit test for check_prog(). r=ted
At the same time, shell quote the result it prints if it needs to be.
2016-03-30 07:00:22 +09:00
Mike Hommey e8721f0397 Bug 1257516 - Use the logger for virtualenv manager output. r=ted 2016-03-30 07:00:17 +09:00
Mike Hommey ba80937ba0 Bug 1257516 - Send the debug output from our logger to config.log. r=ted
And since the file is also used for old-configure, close our handle on
the file before spawning old-configure, and make old-configure append
there instead of truncating the file.
2016-03-30 07:00:07 +09:00
Mike Hommey 47d916d8f0 Bug 1257516 - Expose a sandboxed logger to moz.configure and use it. r=ted
This removes the warn() function and makes the die() function use the logger
instead of print.
2016-03-30 07:00:03 +09:00
Mike Hommey 96b6664c24 Bug 1257516 - Rename error() to die() and make it take arguments like the logging module. r=ted 2016-03-30 06:59:44 +09:00
Mike Hommey f215c4d869 Bug 1259620 - Add @checking to host and target to display the triplets. r=gps 2016-03-26 07:17:58 +09:00
Mike Hommey 3b84619fff Bug 1259620 - Add an optional formatting callback to @checking. r=gps 2016-03-26 07:17:51 +09:00
Mike Hommey 78d9b6ffa4 Bug 1259354 - Avoid "checking yasm version" being written out when yasm was not found. r=ted
The reason the "checking" string always appears is that @depends
functions are always called, regardless of the value of the dependency.

This introduces a new decorator @depends_true, which works like
@depends, but the decorated function is not called unless one of the
dependency value resolves to True.

The new decorator can also be used to replace many cases where we do
@depends(foo)
def bar(foo):
    if foo:
        ...
2016-03-25 06:54:35 +09:00
Mike Hommey 8a90d1c8e4 Bug 1259352 - Always fail check_prog if an explicit value was given on the command line or environment. r=ted 2016-03-25 06:54:35 +09:00
Mike Hommey b5c2226dba Bug 1259346 - Make delayed_getattr more resilient to failure. r=nalexander 2016-03-25 06:54:35 +09:00
Mike Hommey 81936f844d Bug 1259275 - Don't check for yasm when building with --disable-compile-environment. r=ted 2016-03-24 14:34:46 +09:00
Mike Hommey 90692a1ac0 Bug 1257823 - Move add_old_configure_assignment() to the global scope. r=nalexander
Similar to set_config, set_define and imply_option, but this is a
sandboxed function that stays sandboxed.
2016-03-24 09:04:28 +09:00
Mike Hommey 6a8ed3e4a8 Bug 1257823 - Move imply_option() to the global scope. r=nalexander
Like set_config and set_define, we move imply_option to the global
scope.
2016-03-24 09:04:28 +09:00
Mike Hommey e5cde501da Bug 1257823 - Move set_define() to the global scope. r=nalexander
For the same reasons as set_config is being moved to the global scope,
we're moving set_define to the global scope here. An additional change
is that set_define is now part of the sandbox itself instead of being
defined within the sandbox, which makes it share the implementation
details with set_config.
2016-03-24 09:04:28 +09:00
Mike Hommey 7cd6c430c1 Bug 1257823 - Move set_config() to the global scope. r=nalexander
The way set_config is set currently makes it difficult to introspect
moz.configure files to know what configuration items are being set,
because they're hidden in the control flow of functions.

This makes some of the moz.configure more convoluted, but this is why
there are templates, and we can improve the recurring cases afterwards.
2016-03-24 09:04:28 +09:00
Mike Hommey ed5e2c39f5 Bug 1257823 - Move set_define() to the sandbox. r=nalexander
In order to make the transition to global set_define easier, move its
current definition from inside the sandbox to the sandbox itself.
2016-03-24 09:04:28 +09:00
Mike Hommey a8db2a2c62 Bug 1258619 - Properly sandbox functions inside a template. r=chmanchester
The way functions are being sandboxed in moz.configure land is that
their global namespace is being replaced with a limited and identifiable
dict. And we avoid re-wrapping a function that already received this
treatment.

The problem is that template functions have their global namespace
replaced, and any function that is defined within the template inherits
that global namespace. So when it comes time to wrap those functions
defined in templates with e.g. depends, we detect that they're already
wrapped although they are not, because we look if their global namespace
is of the recognizable type we use when replacing it.

So instead of looking at the global namespace type, keep track of all
functions that are wrapped.
2016-03-23 13:24:54 +09:00
Mike Hommey 2ee885572e Bug 1258785 - Return a None value when check_prog doesn't find a program. r=ted 2016-03-23 13:24:49 +09:00
Mike Hommey aec687f13d Bug 1258618 - Use True instead of '1' for add_old_configure_assignment. r=nalexander 2016-03-23 09:24:53 +09:00
Mike Hommey 9b54a468a9 Bug 1258618 - Use True instead of '1' for set_define. r=nalexander 2016-03-23 09:24:51 +09:00
Mike Hommey 521861c0e2 Bug 1258618 - Use True instead of '1' for set_config. r=nalexander 2016-03-23 09:24:50 +09:00
Mike Hommey b43aae42ec Bug 1258618 - Allow to use bools as values given to add_old_configure_assignment. r=nalexander 2016-03-23 09:24:49 +09:00
Wes Kocher 1922ce7aa8 Merge m-c to inbound, a=merge CLOSED TREE
MozReview-Commit-ID: KCev5FqbsuD
2016-03-22 16:57:35 -07:00
Nick Alexander 40132bc444 Bug 1256995 - Move --with-gradle to mobile/android/moz.configure. r=glandium
This also adds a GRADLE_FLAGS environment variable for use in
automation.

Manually tested.

MozReview-Commit-ID: 8nDkqz2VnJn

--HG--
extra : rebase_source : 32626a7dc0c0a6a440e300d92c31670f14319325
extra : amend_source : fe134e25f079851b4c648b53a7a485ee20c15c18
2016-03-17 11:04:08 -07:00
Mike Hommey b93503b5e7 Bug 1257468 - Move JS_STANDALONE to moz.configure. r=nalexander 2016-03-22 11:09:43 +09:00