[llvm-branch-commits] [llvm-branch] r258892 - Merging r258891:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Jan 26 16:19:52 PST 2016


Author: hans
Date: Tue Jan 26 18:19:52 2016
New Revision: 258892

URL: http://llvm.org/viewvc/llvm-project?rev=258892&view=rev
Log:
Merging r258891:
------------------------------------------------------------------------
r258891 | hans | 2016-01-26 16:19:05 -0800 (Tue, 26 Jan 2016) | 25 lines

test-release.sh: Ignore LC_CTYPE in sed invocation on Darwin

Here, sed is used to prepare object files for comparison via cmp. On my Darwin
15.4.0 machine, LC_CTYPE is set to UTF-8 (by default, I believe). Under these
circumstances, anything sed is made to read will be treated as UTF-8, prompting
it to signal an error if it is not, like so:

% sed s/a/b/ <(head -n1 /dev/random) >/dev/null; echo $?
sed: RE error: illegal byte sequence
1
%

To make sed work as expected, I need to set LC_CTYPE to C:

% env LC_CTYPE=C sed s/a/b/ <(head -n1 /dev/random) >/dev/null; echo $?
0
%

Without this change, sed will exit with an error for every single file that it
compares between phase 2 and phase 3, thereby making it look as if the
differences were far larger than they are.

Patch by Elias Pipping!

Differential Revision: http://reviews.llvm.org/D16548
------------------------------------------------------------------------

Modified:
    llvm/branches/release_38/   (props changed)
    llvm/branches/release_38/utils/release/test-release.sh

Propchange: llvm/branches/release_38/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan 26 18:19:52 2016
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,257645,257648,257730,257775,257791,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258690,258729
+/llvm/trunk:155241,257645,257648,257730,257775,257791,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258690,258729,258891

Modified: llvm/branches/release_38/utils/release/test-release.sh
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/utils/release/test-release.sh?rev=258892&r1=258891&r2=258892&view=diff
==============================================================================
--- llvm/branches/release_38/utils/release/test-release.sh (original)
+++ llvm/branches/release_38/utils/release/test-release.sh Tue Jan 26 18:19:52 2016
@@ -540,8 +540,9 @@ for Flavor in $Flavors ; do
             # Substitute 'Phase2' for 'Phase3' in the Phase 2 object file in
             # case there are build paths in the debug info. On some systems,
             # sed adds a newline to the output, so pass $p3 through sed too.
-            if ! cmp -s <(sed -e 's,Phase2,Phase3,g' $p2) <(sed -e '' $p3) \
-                    16 16 ; then
+            if ! cmp -s \
+                <(env LC_CTYPE=C sed -e 's,Phase2,Phase3,g' $p2) \
+                <(env LC_CTYPE=C sed -e '' $p3) 16 16; then
                 echo "file `basename $p2` differs between phase 2 and phase 3"
             fi
         done




More information about the llvm-branch-commits mailing list