-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic support for builtins from compiler-rt #18734
Conversation
@@ -228,6 +228,9 @@ LLVM_DEBUG := 0 | |||
#LLVM_USE_CMAKE: defined in deps/llvm-ver.mk as it depends on LLVM_VER_SHORT | |||
# set to 1 to get clang and compiler-rt | |||
BUILD_LLVM_CLANG := 0 | |||
# set to 0 to not build compiler-rt standalone. | |||
# it will still be build if BUILD_LLVM_CLANG is set to 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will still be built
@@ -39,7 +39,7 @@ include $(SRCDIR)/tools/git-external.mk | |||
# prevent installing libs into usr/lib64 on opensuse | |||
unexport CONFIG_SITE | |||
|
|||
DEP_LIBS := | |||
DEP_LIBS := compiler-rt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only ifeq($(BUILD_COMPILER_RT), 1)
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is more complicated than that. As far as I can tell we will need to unconditionally build with compiler-rt (except for llvm-free builds).
BUILD_COMPILER_RT==1
means that we will try to build a standalone compiler-rt iff LLVM hasn't build one.
## | ||
# In order to support fallbacks within llvm we need to support | ||
# compiler-rt. This means linking sys.so against it and resolving | ||
# symbols at during JIT. For the latter part we need to create |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"symbols during JIT" ? or missing word?
# There are several configurations to take into account. | ||
# 1. USE_SYSTEM_LLVM == 1 | ||
# libclang_rt.builtins is distributed with clang and so | ||
# we assume that USE_SYSTEM_LLVM == 1 means that clang is also |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure this is a safe assumption to make
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this adds an implicit dependency on clang...
We could relax this a bit by using a standalone build for USE_SYSTEM_LLVM == 1 && BUILD_COMPILER_RT == 1
, but for USE_SYSTEM_LLVM == 1 && BUILD_COMPILER_RT == 0
, we need to fall back onto a system version of compiler-rt and that comes at least on Archlinux with clang.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least for Fedora RPMs, I need USE_SYSTEM_LLVM=1
and I also have to build LLVM with gcc. Is that a problem, or is installing clang enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Installing clang will be enough or you can set STANDALONE_COMPILER_RT:=1
# we assume that USE_SYSTEM_LLVM == 1 means that clang is also | ||
# installed. | ||
# 2. BUILD_LLVM_CLANG == 1 | ||
# libclang_rt.builtins is build with clang and we can pick that up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is built with
# 3. BUILD_COMPILER_RT == 1 | ||
# Download and install compiler_rt independently of llvm/clang | ||
# | ||
# Since we need the shared opjectfile for JIT there is no USE_SYSTEM_COMPILER_RT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there really no desire from upstream to fix this there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can try and fix this upstream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
worth a shot, I'd rather carry patches and maybe adjust the way we build LLVM if the long-term idea is we can upstream the patches, instead of needing extra makefile wrappers here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will still need the standalone buildscript, but you are right it is worth a shot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, "opjectfile" -> "objectfile"
$(CC) $(LDFLAGS) -shared $(fPIC) -o $@ -nostdlib $(WHOLE_ARCHIVE) -L$(CRT_DIR) -l$(CRT_STATIC_NAME) $(WHOLE_NOARCHIVE) | ||
else | ||
# The standalone compiler-rt build is based on | ||
# https://github.com/ReservedField/arm-compiler-rt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not reuse code, but I was inspired by the way they solved the build issue., but I can add the copyright notice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm okay, "based on" is a bit ambiguous
extract-compiler-rt: $(COMPILER_RT_SRCDIR)/source-extracted | ||
endif | ||
check-compiler-rt: #NONE | ||
fast-check-compiler-rt: #NONE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fastcheck-compiler-rt
rm -rf $(COMPILER_RT_BUILDDIR) | ||
compile-compiler-rt: $(COMPILER_RT_BUILDDIR)/$(COMPILER_RT_LIBFILE) | ||
install-compiler-rt: $(COMPILER_RT_BUILDDIR)/$(COMPILER_RT_LIBFILE) | ||
cp $(COMPILER_RT_BUILDDIR)/$(COMPILER_RT_LIBFILE) $(build_private_libdir)/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will need to use one of the confusing install macros to support uninstall. might also need a manifest file, however those are supposed to work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not yet addressed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vtjnash When I discussed this with you, you mentioned that I might not need to use the macro since I only install two files?
I am also happy to use the staged-install mechanism, but I hadn't had time to understand it yet.
static const char *const prefix = "__"; | ||
if (!compiler_rt_hdl) | ||
return 0; | ||
if (strncmp(name, prefix, strlen(prefix) != 0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this supposed to be if (strncmp(name, prefix, strlen(prefix)) != 0)
?
CRT_ARCH_SRCDIR := $(CRT_SRCDIR)/$(CRT_ARCH) | ||
CRT_INCLUDES := -I$(CRT_SRCDIR) -I$(CRT_ARCH_SRCDIR) | ||
CRT_CFLAGS := \ | ||
-std=gnu99 -fPIC -fno-builtin -fvisibility=hidden \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$(fPIC)
does -fvisibility=hidden
do the same thing everywhere?
also might need to check on -ffreestanding
CRT_CFLAGS := \ | ||
-std=gnu99 -fPIC -fno-builtin -fvisibility=hidden \ | ||
-ffreestanding $(CRT_INCLUDES)\ | ||
$(if $(USE_CLANG), -Wno-unknown-attributes -Wno-macro-redefined) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our usual style for this has been to split it onto separate lines, but perhaps not universal:
ifeq ($(USE_CLANG),1)
CRT_CFLAGS += ...
endif
CRT_SRCDIR := $(COMPILER_RT_SRCDIR)/lib/builtins | ||
CRT_ARCH_SRCDIR := $(CRT_SRCDIR)/$(CRT_ARCH) | ||
CRT_INCLUDES := -I$(CRT_SRCDIR) -I$(CRT_ARCH_SRCDIR) | ||
CRT_CFLAGS := \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add $(CPPFLAGS) $(CFLAGS)
too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this have -O2
also?
$(CC) $(CRT_CFLAGS) -c $< -o $@ | ||
|
||
$(COMPILER_RT_BUILDDIR)/$(COMPILER_RT_LIBFILE): $(CRT_OBJS) | ||
$(CC) -shared -o $@ $^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this need -fvisibility=hidden
?
add $(LDFLAGS)
here too
endif | ||
|
||
$(COMPILER_RT_SRCDIR)/source-extracted: | $(COMPILER_RT_TAR) | ||
ifneq ($(COMPILER_RT_TAR),) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this rule makes sense overall if COMPILER_RT_TAR
is empty
LLVM_MFLAGS += OPTIONAL_PARALLEL_DIRS= | ||
endif | ||
else | ||
ifeq ($(LLVM_VER_SHORT),$(filter $(LLVM_VER_SHORT),3.3 3.4 3.5 3.6 3.7)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
USE_LLVM_CMAKE
?
37f9286
to
6a0940c
Compare
Updated the PR to address the feedback given so far. I run into two major annoyances the first is that LLVM 3.9 can't build compiler-rt without clang and that the way I discover the files is problematic, because it relies on the source being already unpacked. @vtjnash suggested splitting the Makefiles, but I was hoping that somebody else might have a better solution. |
# set to 1 to build compiler-rt standalone. | ||
STANDALONE_COMPILER_RT := 0 | ||
# set to 0 to disable building compiler-rt standalone. | ||
# Currently compiler-rt can only be build alongside clang |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can only be built
6fa6d5a
to
e78a328
Compare
So travis for Linux is passing. Yeah! I will see if I can get my hand on a Mac. @yuyichao If you have time would you mind taking a look at ARM? The build-script might need some adjustments to pick up the right Arch implementations and blacklist unnecessary ones. |
So I fixed ARM&Power + Mac. The remaining platform is windows (which I don't have access to at the moment) |
Try cross-compiling? |
@@ -481,10 +486,13 @@ OBJCOPY := $(CROSS_COMPILE)objcopy | |||
# file extensions | |||
ifeq ($(OS), WINNT) | |||
SHLIB_EXT := dll | |||
STATICLIB_EXT := lib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only with msvc. where are you dealing with a lib file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also under mingw64? ce33683 changed that we are now linking sys.so statically against compiler-rt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, mingw static libraries are .a extension. compiler-rt's build system is probably full of wrong windows==msvc assumptions that should be fixed rather than worked around the wrong way here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I will fix this in the morning (It was my wrong assumption, not compiler-rts)
Is there a way of detecting the compiler from the Makefile?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's a USEMSVC or some flag like that but it's a hack, you probably shouldn't worry about it. if we ever support msvc properly it'll be via cmake anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So just changing lib
to a
would be sufficient for now?
So with build support for Windows, Mac, ARM, Power this is ready for another round of reviews, before I squash and rebase. |
@@ -486,7 +486,7 @@ OBJCOPY := $(CROSS_COMPILE)objcopy | |||
# file extensions | |||
ifeq ($(OS), WINNT) | |||
SHLIB_EXT := dll | |||
STATICLIB_EXT := lib | |||
STATICLIB_EXT := .a # MSVC is .lib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if comments are on the same line in a makefile variable, the value will include the trailing space - this might not break anything, but keep it in mind
@@ -486,7 +486,11 @@ OBJCOPY := $(CROSS_COMPILE)objcopy | |||
# file extensions | |||
ifeq ($(OS), WINNT) | |||
SHLIB_EXT := dll | |||
STATICLIB_EXT := a # MSVC is lib | |||
ifeq ($(USE_MSVC),1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no underscore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should really stop pushing commits late night. Thank you for catching this.
1bc4ec6
to
935be6e
Compare
static uint64_t resolve_compiler_rt(const char *name) | ||
{ | ||
#if defined(__APPLE__) | ||
static const char *const compiler_rt_lib = "@rpath/julia/libcompiler-rt"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vtjnash Is this the correct form for a rpath library? Or do I need to add .dylib
?
@@ -374,7 +374,11 @@ endif | |||
$(INSTALL_F) $(addprefix $(JULIAHOME)/,src/julia.h src/julia_threads.h src/support/*.h) $(DESTDIR)$(includedir)/julia | |||
$(INSTALL_F) $(BUILDROOT)/src/julia_version.h $(DESTDIR)$(includedir)/julia | |||
# Copy julia's copy of compiler-rt | |||
ifeq ($(OS),WINNT) | |||
$(INSTALL_M) $(build_private_libdir)/libcompiler-rt.$(SHLIB_EXT) $(DESTDIR)$(bindir) | |||
else | |||
$(INSTALL_M) $(build_private_libdir)/libcompiler-rt.$(SHLIB_EXT) $(DESTDIR)$(private_libdir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why isn't this just using shlibdir then?
af59013
to
1a9af7f
Compare
Ok this is nearly done. Mac test just succeeded I would squash this and remove the debug information (or does anybody want to keep the poetry and the history for reviewing?) |
278bedb
to
7d1cbae
Compare
Original version preserved at |
Can you move that to your fork? Would rather clean up no-longer-relevant branches from here. This still doesn't support uninstall, does it? |
Uninstall? You mean On Tue, 11 Oct 2016, 16:47 Tony Kelman, [email protected] wrote:
|
no, |
@@ -324,7 +324,7 @@ static uint64_t resolve_compiler_rt(const char *name) | |||
// jl_dlsym_e expects an unmangled 'C' symbol name, | |||
// so iff we are on Darwin we strip the leading '_' off. | |||
static const char *const mangled_prefix = "___"; | |||
if (strncmp(name, mangled_prefix, strlen(mangled_prefix)) != 0) { | |||
if (strncmp(name, mangled_prefix, strlen(mangled_prefix)) == 0) { | |||
++name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent
@@ -135,12 +135,14 @@ fastcheck-compiler-rt: #NONE | |||
configure-compiler-rt: $(COMPILER_RT_BUILDDIR)/build-configured | |||
clean-compiler-rt: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think clean should depend on uninstall, most of the autogenerated ones do IIRC
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See L145.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makefiles are awful
Can I request that we hold off on merging anything LLVM build related until we're sure the buildbots are in good shape and will handle it? We haven't had nightlies in several weeks, and it looks like there are some new consistent failures within the last few days. |
I did not manage to reproduce the buildbot failure :( Maybe the best course of actions is to wait on #19123 and the associated buildbot changes? |
1dbb7fd
to
2f8a69d
Compare
2f8a69d
to
25b985b
Compare
Rebased this for you to pick up llvm 3.9, ran it through the buildbots. 32 bit Linux still has issues, segfaults when trying to build the docs: https://build.julialang.org/builders/package_tarball32/builds/1140/steps/make%20binary-dist/logs/stdio And on Windows, it's trying to use pthreads. We can't switch our compiler version on Windows to one that supports pthreads for as long as we need to be able to build Windows binaries against LLVM 3.7 on the same buildbots.
|
# Blacklist a few files we don't want to deal with | ||
## | ||
MAKEFLAGS := --no-builtin-rules | ||
BLACKLIST := atomic.o atomic_flag_clear.o atomic_flag_clear_explicit.o \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tkelman the emutls
failure means we need to update the blacklist to contain the related files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commit that and we could try throwing it at the buildbots again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like that fixes the windows build (need to run tests locally, will see) but not whatever's wrong with the 32 bit linux buildbot
Compiler-rt is the runtime library of LLVM and sometimes we need to resolve library calls to it. There are two moments were we need to handle library calls to compiler-rt. 1. `sys.so` or any other Julia code compiled into shlibs. In this case we perform static linking, as with other runtime libraries. 2. JIT time. When we compile a Julia function that uses a libcall to crt we need to resolve that against a shlib copy of compiler-rt. Compiler-rt is usually only distributed as a static library, so we provide a step to turn the static library into a shared one. The buildsystem of compiler-rt is tightly tied to LLVM. Because of this we have a staged build-script that builds compiler-rt from source. This standalone version should only be used for Julia.
LLVM intrinsics either map to instructions or to functions in compiler-rt. If we can't find a symbol look into a shared version of compiler-rt and resolve the functions there. On Darwin we have to use a unmangled version of the function name.
One most systems (except modern mac) these tests will fail if compiler-rt is not properly configured.
25b985b
to
34de984
Compare
Running on 32-bit linux (inside a Docker container) I get through bootstrap, but then I get a segfault when I try to run
This was done through the following, you can do it too if you have
|
Interesting that it seqfaults when dlopen'ing the `sys.so`. Could you check
if the imagine only contains 32bit instructions?
…On Sun, 1 Jan 2017, 18:08 Elliot Saba, ***@***.***> wrote:
Running on 32-bit linux (inside a Docker container) I get through
bootstrap, but then I get a segfault when I try to run ./julia. Here's
the backtrace:
(gdb) bt
#0 0xf7fe479d in elf_machine_rel (skip_ifunc=<optimized out>,
reloc_addr_arg=<optimized out>, version=<optimized out>, sym=0xf30da45c,
reloc=0xf313708c, map=0x805d320) at ../sysdeps/i386/dl-machine.h:312
#1 elf_dynamic_do_Rel (skip_ifunc=<optimized out>, lazy=<optimized out>,
nrelative=<optimized out>, relsize=<optimized out>, reladdr=<optimized out>,
map=<optimized out>) at do-rel.h:137
#2 _dl_relocate_object (scope=0x805d4d8, reloc_mode=0, consider_profiling=0)
at dl-reloc.c:258
#3 0xf7fec6bf in dl_open_worker (a=0xffffce9c) at dl-open.c:435
#4 0xf7fe8204 in _dl_catch_error ***@***.***=0xffffce94,
***@***.***=0xffffce98, ***@***.***=0xffffce93,
operate=0xf7fec370 <dl_open_worker>, args=0xffffce9c) at dl-error.c:187
#5 0xf7febf02 in _dl_open (file=0xffffd160 "/src/julia/usr/lib/julia/sys.so",
mode=-2147483646, caller_dlopen=0xf7d017da <jl_dlopen+119>, nsid=<optimized out>,
argc=1, argv=0xffffd644, env=0xffffd64c) at dl-open.c:660
#6 0xf7cacbf5 in dlopen_doit (a=0xffffd050) at dlopen.c:66
#7 0xf7fe8204 in _dl_catch_error (objname=0x805d2ec, errstring=0x805d2f0,
mallocedp=0x805d2e8, operate=0xf7cacb80 <dlopen_doit>, args=0xffffd050)
at dl-error.c:187
#8 0xf7cad30d in _dlerror_run ***@***.***=0xf7cacb80 <dlopen_doit>,
***@***.***=0xffffd050) at dlerror.c:163
#9 0xf7cacc9e in __dlopen (
***@***.***=0xffffd160 "/src/julia/usr/lib/julia/sys.so", mode=2) at dlopen.c:87
#10 0xf7d017da in jl_dlopen (
***@***.***=0xffffd160 "/src/julia/usr/lib/julia/sys.so",
***@***.***=9) at /src/julia/src/dlload.c:81
#11 0xf7d01a8b in jl_load_dynamic_library_ (
***@***.***=0xffffd390 "/src/julia/usr/lib/julia/sys",
***@***.***=9, ***@***.***=0) at /src/julia/src/dlload.c:179
#12 0xf7d01b8a in jl_load_dynamic_library_e (
modname=0xffffd390 "/src/julia/usr/lib/julia/sys", ***@***.***=9)
at /src/julia/src/dlload.c:204
#13 0xf7d11ddb in jl_preload_sysimg_so (fname=<optimized out>)
at /src/julia/src/dump.c:2367
#14 0xf7d04558 in _julia_init (rel=<optimized out>, ***@***.***=JL_IMAGE_JULIA_HOME)
at /src/julia/src/init.c:532
#15 0xf7d0510c in julia_init (rel=JL_IMAGE_JULIA_HOME) at /src/julia/src/task.c:292
#16 0x08048f7c in main (argc=<optimized out>, argv=<optimized out>)
at /src/julia/ui/repl.c:251
This was done through the following, you can do it too if you have docker
installed:
$ docker run -ti staticfloat/julia_workerbase_ubuntu16_04:x86
# git clone -b vc/compiler-rt https://github.com/JuliaLang/julia /src/julia
# cd /src/julia; make -j8
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#18734 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAI3avgIaLIoVJN6UYQp8BB8TriJaE_1ks5rN2zygaJpZM4KKgMs>
.
|
Yep, looks good to me. Using
Note that this output is from my fork of analyze-x86 which knows what |
Ping (this is part of equal rights for Float16, right?) |
It's good to have, but it was deemed not ready for 0.6, unfortunately. |
Yes this part of my julia runtime julep, that has the goal of adding first-class support for Float16 and Float128. This got slowed down by other commitments of mine. I still have hope to have some form of this for 1.0. |
@vchuravy, what's the prospect for getting this done in the next couple of months? |
Everytime I start working on this I get into shaving another Yak. I think we can get this done in the next few months, but I will first focus on Float128 and then return to this. |
superseded by #26381, while general compiler-rt support might be something we want in the long-term I rather go down the RTLIB approach. |
Compiler-rt is a support library for clang/llvm. It is used to support llvm intrinsics backend agnostic. Examples are soft-fp support on ARM and Float16 support.
A motivating use-case is #17344, related issues are #14818, #18287 (comment), and this will allow us to properly fix #4905.
Caveats
libcompiler-rt.so
is not used by anybody, but Julia so this PR currently installs it tousr/lib/julia
.I am not very experienced in writing Makefiles so I would like to have some critique and I will need some help for non-Linux systems and ARM.
TODO