]>
git.saurik.com Git - apple/ld64.git/blob - compile_stubs
3 # Attempt to find the architecture.
4 # First look through the command line args.
6 set link_cmd
=(`cat link_command`)
7 while ( $#link_cmd > 0 )
8 if ( "$link_cmd[1]" == "-arch" ) then
14 # look for an explicit arch file
15 if ( "$arch" == "unknown" ) then
21 if ( "$arch" == "unknown" ) then
22 echo "***** Unable to determine architecture."
26 # Create .dylibs for each file in the dylib_stubs directory.
27 if ( -e dylib_stubs
) then
28 set files
=`cd dylib_stubs ; echo *`
31 if ( ! -e dylibs
/$file ) then
32 clang
-arch $arch -c -fno-builtin -o tmp_object.o
-x c dylib_stubs
/$file
33 ld
-arch $arch -dylib -macosx_version_min 10.1 -no_version_load_command -o dylibs
/$file tmp_object.o
38 # Create .frameworks for each file in the framework_stubs directory.
39 if ( -e framework_stubs
) then
40 set files
=`cd framework_stubs ; echo *`
42 if ( ! -e frameworks
/$file.framework
) then
43 clang
-arch $arch -c -fno-builtin -o tmp_object.o
-x c framework_stubs
/$file
44 mkdir -p frameworks
/$file.framework
45 ld
-arch $arch -dylib -macosx_version_min 10.1 -no_version_load_command -o frameworks
/$file.framework
/$file tmp_object.o