[llvm-bugs] [Bug 43503] New: Crash during build when removing instruction sets
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Sep 29 18:40:30 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=43503
Bug ID: 43503
Summary: Crash during build when removing instruction sets
Product: clang
Version: unspecified
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: rene.sugar at gmail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at metafoo.co.uk
I tried modifying the code generation of the Homebrew LLVM formula to build
without instructions illegal on my computer's CPU.
The version of clang that came with Xcode runs...
clang --version
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.5.0
Thread model: posix
InstalledDir:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
but, clang build via Homebrew is failing when trying to remove instruction sets
not supported by my computer's CPU.
Steps:
1. brew edit llvm
2. Add CMAKE_CXX_FLAGS to
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/llvm.rb
https://github.com/Homebrew/homebrew-core/blob/master/Formula/llvm.rb
a) fails later
-DCMAKE_CXX_FLAGS:STRING='--target=x86_64-apple-darwin16.6.0\ -mno-sse4a\
-mno-sse4.2\ -mno-avx'
b) fails earlier
-DCMAKE_CXX_FLAGS:STRING='--target=x86_64-apple-darwin16.6.0\ -mno-sse\
-mno-sse2\ -mno-sse3\ -mno-ssse3\ -mno-sse4a\ -mno-sse4.1\ -mno-sse4.2\
-mno-avx'
3. brew install --build-from-source --verbose llvm
4. LLVM build fails in different places depending upon which instruction sets
are turned off.
Older MacBook Pro with the following capabilities:
https://github.com/Mysticial/FeatureDetector
./FeatureDetector_main
CPU Vendor String: GenuineIntel
CPU Vendor:
AMD = No
Intel = Yes
OS Features:
OS AVX = No
OS AVX512 = No
Hardware Features:
MMX = Yes
x64 = Yes
ABM = No
RDRAND = No
BMI1 = No
BMI2 = No
ADX = No
MPX = No
PREFETCHWT1 = No
SIMD: 128-bit
SSE = Yes
SSE2 = Yes
SSE3 = Yes
SSSE3 = Yes
SSE4a = No
SSE4.1 = Yes
SSE4.2 = No
AES-NI = No
SHA = No
SIMD: 256-bit
AVX = No
XOP = No
FMA3 = No
FMA4 = No
AVX2 = No
SIMD: 512-bit
AVX512-F = No
AVX512-CD = No
AVX512-PF = No
AVX512-ER = No
AVX512-VL = No
AVX512-BW = No
AVX512-DQ = No
AVX512-IFMA = No
AVX512-VBMI = No
Summary:
Safe to use AVX: No
Safe to use AVX512: No
Just setting the following allows Homebrew LLVM to build but instructions
illegal on my computer's CPU are included causing a crash when trying to
compile the regex Python extension:
export MACOSX_DEPLOYMENT_TARGET=10.12
export CFLAGS=--target=x86_64-apple-darwin16.6.0
https://bitbucket.org/mrabarnett/mrab-regex/
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190930/a55e2be4/attachment-0001.html>
More information about the llvm-bugs
mailing list