alien.inline: renamed compiler-args to linker-args
parent
4a5cb3aac3
commit
b03b769966
|
@ -12,11 +12,11 @@ IN: alien.inline
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
SYMBOL: c-library
|
SYMBOL: c-library
|
||||||
SYMBOL: library-is-c++
|
SYMBOL: library-is-c++
|
||||||
SYMBOL: compiler-args
|
SYMBOL: linker-args
|
||||||
SYMBOL: c-strings
|
SYMBOL: c-strings
|
||||||
|
|
||||||
: cleanup-variables ( -- )
|
: cleanup-variables ( -- )
|
||||||
{ c-library library-is-c++ compiler-args c-strings }
|
{ c-library library-is-c++ linker-args c-strings }
|
||||||
[ off ] each ;
|
[ off ] each ;
|
||||||
|
|
||||||
: function-types-effect ( -- function types effect )
|
: function-types-effect ( -- function types effect )
|
||||||
|
@ -56,7 +56,7 @@ SYMBOL: c-strings
|
||||||
|
|
||||||
: compile-library ( -- )
|
: compile-library ( -- )
|
||||||
library-is-c++ get [ C++ ] [ C ] if
|
library-is-c++ get [ C++ ] [ C ] if
|
||||||
compiler-args get
|
linker-args get
|
||||||
c-strings get "\n" join
|
c-strings get "\n" join
|
||||||
c-library get compile-to-library ;
|
c-library get compile-to-library ;
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ PRIVATE>
|
||||||
: define-c-library ( name -- )
|
: define-c-library ( name -- )
|
||||||
c-library-name c-library set
|
c-library-name c-library set
|
||||||
V{ } clone c-strings set
|
V{ } clone c-strings set
|
||||||
V{ } clone compiler-args set ;
|
V{ } clone linker-args set ;
|
||||||
|
|
||||||
: compile-c-library ( -- )
|
: compile-c-library ( -- )
|
||||||
compile-library? [ compile-library ] when
|
compile-library? [ compile-library ] when
|
||||||
|
@ -87,10 +87,10 @@ PRIVATE>
|
||||||
] dip append-function-body c-strings get push ;
|
] dip append-function-body c-strings get push ;
|
||||||
|
|
||||||
: c-link-to ( str -- )
|
: c-link-to ( str -- )
|
||||||
"-l" prepend compiler-args get push ;
|
"-l" prepend linker-args get push ;
|
||||||
|
|
||||||
: c-use-framework ( str -- )
|
: c-use-framework ( str -- )
|
||||||
"-framework" swap compiler-args get '[ _ push ] bi@ ;
|
"-framework" swap linker-args get '[ _ push ] bi@ ;
|
||||||
|
|
||||||
: c-link-to/use-framework ( str -- )
|
: c-link-to/use-framework ( str -- )
|
||||||
os macosx? [ c-use-framework ] [ c-link-to ] if ;
|
os macosx? [ c-use-framework ] [ c-link-to ] if ;
|
||||||
|
|
Loading…
Reference in New Issue