From eb72ba84f613ae5e5d3be6d018e33fdf3832558f Mon Sep 17 00:00:00 2001 From: Jeremy Hughes Date: Sat, 11 Jul 2009 19:23:49 +1200 Subject: [PATCH] alien.inline.compiler: fixed library-path and made other words private --- basis/alien/inline/compiler/compiler.factor | 25 ++++++++++++--------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/basis/alien/inline/compiler/compiler.factor b/basis/alien/inline/compiler/compiler.factor index d7d2d6fc43..4abc78ff67 100644 --- a/basis/alien/inline/compiler/compiler.factor +++ b/basis/alien/inline/compiler/compiler.factor @@ -22,14 +22,8 @@ SYMBOL: C++ { [ dup windows? ] [ drop ".dll" ] } } cond ; -: library-path ( str -- str' ) - '[ "lib" % _ % library-suffix % ] "" make temp-file ; - -: src-suffix ( lang -- str ) - { - { C [ ".c" ] } - { C++ [ ".cpp" ] } - } case ; +: library-path ( str -- path ) + '[ "lib" % _ % library-suffix % ] "" make inline-library-file ; HOOK: compiler os ( lang -- str ) @@ -59,8 +53,16 @@ M: macosx link-descr { "-g" "-prebind" "-dynamiclib" "-o" } cpu x86.64? [ { "-arch" "x86_64" } prepend ] when ; -: link-command ( in out lang -- descr ) - compiler-descr link-descr append prepend prepend ; + :: compile-to-library ( lang args contents name -- ) lang contents name compile-to-object