Skip to content

Commit

Permalink
remove build_h.jl dependency from inference.ji sysimg
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash committed Jun 3, 2015
1 parent da9d5ec commit a0e503e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ CORE_SRCS := base/boot.jl base/coreimg.jl \
base/abstractarray.jl \
base/array.jl \
base/bool.jl \
base/build_h.jl \
base/dict.jl \
base/error.jl \
base/essentials.jl \
Expand Down
1 change: 0 additions & 1 deletion base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ uv_constants.jl: ../src/uv_constants.h $(build_includedir)/uv-errno.h

build_h.jl.phony:
@echo "# This file is automatically generated in base/Makefile" > $@
@$(CPP_STDOUT) build.h -I../src/support | grep . >> $@
@echo "const ARCH = :$(ARCH)" >> $@
ifeq ($(XC_HOST),)
@echo "const MACHINE = \"$(BUILD_MACHINE)\"" >> $@
Expand Down
2 changes: 2 additions & 0 deletions base/c.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

import Core.Intrinsics: cglobal, box, unbox

const OS_NAME = ccall(:jl_get_OS_NAME, Any, ())

cfunction(f::Function, r, a) = ccall(:jl_function_ptr, Ptr{Void}, (Any, Any, Any), f, r, a)

if ccall(:jl_is_char_signed, Any, ())
Expand Down
1 change: 0 additions & 1 deletion base/coreimg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ print(a::ANY...) = for x=a; print(x); end
## Load essential files and libraries
include("essentials.jl")
include("reflection.jl")
include("build_h.jl")
include("options.jl")

# core operations & types
Expand Down
16 changes: 16 additions & 0 deletions src/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,22 @@ DLLEXPORT void jl_raise_debugger(void)
#endif // _OS_WINDOWS_
}

DLLEXPORT jl_sym_t* jl_get_OS_NAME()
{
#if defined(_OS_WINDOWS_)
return jl_symbol("Windows");
#elif defined(_OS_LINUX_)
return jl_symbol("Linux");
#elif defined(_OS_FREEBSD_)
return jl_symbol("FreeBSD");
#elif defined(_OS_DARWIN_)
return jl_symbol("Darwin");
#else
#warning OS_NAME is Unknown
return jl_symbol("Unknown");
#endif
}

#ifdef __cplusplus
}
#endif

0 comments on commit a0e503e

Please sign in to comment.