     } case ;
 
 : link-command ( args in out lang -- descr )
-    [ 2array ] dip compiler-descr link-descr
+    [ 2array ] dip [ compiler 1array ] [ link-descr ] bi
     append prepend prepend ;
 
 :: compile-to-object ( lang contents name -- )

M: windows compiler
    {
        { C [ "gcc" ] }
        { C++ [ "gcc" ] }
    } case ;

HOOK: compiler-descr os ( lang -- descr )

M: macosx compiler-descr
    call-next-method cpu x86.64?
    [ { "-arch" "x86_64" } append ] when ;

HOOK: link-descr os ( lang -- descr )

M: word link-descr drop { "-shared" "-o" } ;
M: macosx link-descr
    drop { "-g" "-prebind" "-dynamiclib" "-o" }
    cpu x86.64? [ { "-arch" "x86_64" } prepend ] when ;
M: windows link-descr
    {
        { C [ { "-mno-cygwin" "-shared" "-o" } ] }
        { C++ [ { "-lstdc++" "-mno-cygwin" "-shared" "-o" } ] }
    } case ;

<PRIVATE
: src-suffix ( lang -- str )
