[m-rev.] for review: Strip executable as a separate step on Mac OS X.
Julien Fischer
jfischer at opturion.com
Thu Mar 20 13:07:42 AEDT 2014
Hi Peter,
On Tue, 18 Mar 2014, Peter Wang wrote:
> Attached in case someone wants to test it on a Mac, as I haven't...
I've tested this and it seems fine.
...
> From a95bd611846663461e046a38b716099df98250a1 Mon Sep 17 00:00:00 2001
> From: Peter Wang <novalazy at gmail.com>
> Date: Tue, 18 Mar 2014 14:36:36 +1100
> Subject: [PATCH] Strip executable as a separate step on Mac OS X.
>
> We had stopped passing the linker strip flag on Mac OS X because it had
> become deprecated and useless there, but we can still strip the binary
> by with the `strip' tool.
>
> This commit changes compile_target_code.m to do so, but NOT the
> `ml' shell script.
>
> compiler/options.m:
> Add internal option --strip-command.
I suggest --strip-executable-command (for consistency with
--link-executable-command), rather than --strip-command.
Also, the option should be publicly documented. (It's annoying to have
to go hunting for these options when you need more precise control over
what happens when linking.)
> configure.ac:
> scripts/Mercury.config.in:
> Set --strip-command="strip" on Darwin platforms, or an empty
> string elsewhere.
>
> compiler/compile_target_code.m:
> Invoke the --strip-command separately after linking an
> executable if necessary.
>
> scripts/ml.in:
> Fix a bug: use configured value of LD_STRIP_FLAG instead of
> assuming "-s".
Aside from that the diff looks fine.
Cheers,
Julien.
More information about the reviews
mailing list