Skip to content

Commit

Permalink
Revert "Add test for llvmcall Function* interface"
Browse files Browse the repository at this point in the history
This reverts commit 8302431.
  • Loading branch information
KristofferC authored and ararslan committed Dec 18, 2018
1 parent 89a0705 commit 099e826
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 65 deletions.
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ julia-base: julia-deps $(build_sysconfdir)/julia/startup.jl $(build_man1dir)/jul
julia-libccalltest: julia-deps
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/src libccalltest

julia-libllvmcalltest: julia-deps
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/src libllvmcalltest

julia-src-release julia-src-debug : julia-src-% : julia-deps julia_flisp.boot.inc.phony
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/src libjulia-$*

Expand All @@ -83,7 +80,7 @@ julia-sysimg-release : julia-stdlib julia-sysimg julia-ui-release
julia-sysimg-debug : julia-stdlib julia-sysimg julia-ui-debug
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT) $(build_private_libdir)/sys-debug.$(SHLIB_EXT)

julia-debug julia-release : julia-% : julia-ui-% julia-sysimg-% julia-symlink julia-libccalltest julia-libllvmcalltest julia-base-cache
julia-debug julia-release : julia-% : julia-ui-% julia-sysimg-% julia-symlink julia-libccalltest julia-base-cache

debug release : % : julia-%

Expand Down Expand Up @@ -231,7 +228,7 @@ JL_TARGETS += julia-debug
endif

# private libraries, that are installed in $(prefix)/lib/julia
JL_PRIVATE_LIBS-0 := libccalltest libllvmcalltest
JL_PRIVATE_LIBS-0 := libccalltest
ifeq ($(USE_GPL_LIBS), 1)
JL_PRIVATE_LIBS-0 += libsuitesparse_wrapper
JL_PRIVATE_LIBS-$(USE_SYSTEM_SUITESPARSE) += libamd libcamd libccolamd libcholmod libcolamd libumfpack libspqr libsuitesparseconfig
Expand Down
6 changes: 1 addition & 5 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ $(build_includedir)/julia/uv/*.h: $(LIBUV_INC)/uv/*.h | $(build_includedir)/juli
$(INSTALL_F) $^ $(build_includedir)/julia/uv

libccalltest: $(build_shlibdir)/libccalltest.$(SHLIB_EXT)
libllvmcalltest: $(build_shlibdir)/libllvmcalltest.$(SHLIB_EXT)

ifeq ($(OS), Linux)
JULIA_SPLITDEBUG := 1
Expand All @@ -175,9 +174,6 @@ endif
@#rm -r [email protected] && mv [email protected] [email protected]
mv [email protected] $@

$(build_shlibdir)/libllvmcalltest.$(SHLIB_EXT): $(SRCDIR)/llvmcalltest.cpp
@$(call PRINT_CC, $(CXX) $(shell $(LLVM_CONFIG_HOST) --cxxflags) $(CXXFLAGS) $(CPPFLAGS) $(DEBUGFLAGS) -O3 $< $(fPIC) -shared -o $@ $(LDFLAGS) -L$(build_shlibdir) -L$(build_libdir) $(NO_WHOLE_ARCHIVE) $(LLVMLINK))

julia_flisp.boot.inc.phony: $(BUILDDIR)/julia_flisp.boot.inc

$(BUILDDIR)/julia_flisp.boot.inc: $(BUILDDIR)/julia_flisp.boot $(FLISP_EXECUTABLE_release)
Expand Down Expand Up @@ -313,4 +309,4 @@ clean-support:

cleanall: clean clean-flisp clean-support

.PHONY: default all debug release clean cleanall clean-* libccalltest libllvmcalltest julia_flisp.boot.inc.phony
.PHONY: default all debug release clean cleanall clean-* libccalltest julia_flisp.boot.inc.phony
32 changes: 0 additions & 32 deletions src/llvmcalltest.cpp

This file was deleted.

23 changes: 0 additions & 23 deletions test/llvmcall.jl
Original file line number Diff line number Diff line change
Expand Up @@ -210,26 +210,3 @@ module CcallableRetTypeTest
end
@test do_the_call() === 42.0
end

# If this test breaks, you've probably broken Cxx.jl - please check
module LLVMCallFunctionTest
using Base: llvmcall
using Test

function julia_to_llvm(@nospecialize x)
isboxed = Ref{UInt8}()
ccall(:julia_type_to_llvm,Ptr{Cvoid},(Any,Ref{UInt8}),x,isboxed)
end
const AnyTy = julia_to_llvm(Any)

const libllvmcalltest = "libllvmcalltest"
const the_f = ccall((:MakeIdentityFunction, libllvmcalltest), Ptr{Cvoid}, (Ptr{Cvoid},), AnyTy)

@eval really_complicated_identity(x) = llvmcall($(the_f), Any, Tuple{Any}, x)

mutable struct boxed_struct
end
let x = boxed_struct()
@test really_complicated_identity(x) === x
end
end

2 comments on commit 099e826

@cdluminate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bad idea to force update the 1.0.3 tag. Why not tagging this as 1.0.3.1 ?

@ararslan
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we don't do versioning that way and we hadn't announced a release yet, so the tag wasn't "finalized."

Please sign in to comment.