|
52 | 52 | print(">>> Building x86_64\n"); |
53 | 53 | system("perl", "$buildscriptsdir/build.pl", "--clean=1", "--classlibtests=0", "--targetarch=x86_64", @passAlongArgs) eq 0 or die ('failing building x86_64'); |
54 | 54 |
|
55 | | -#print(">>> Building ARM64\n"); |
56 | | -#system("perl", "$buildscriptsdir/build.pl", "--clean=1", "--classlibtests=0", "--targetarch=arm64", @passAlongArgs) eq 0 or die ("failing building ARM64"); |
| 55 | +print(">>> Building ARM64\n"); |
| 56 | +system("perl", "$buildscriptsdir/build.pl", "--clean=1", "--classlibtests=0", "--targetarch=arm64", @passAlongArgs) eq 0 or die ("failing building ARM64"); |
57 | 57 |
|
58 | 58 | if ($artifact) |
59 | 59 | { |
|
62 | 62 | # Copy stuff in the embedruntimes directory |
63 | 63 | my $embedDirRoot = "$buildsroot/embedruntimes"; |
64 | 64 | my $embedDirSourceX64 = "$embedDirRoot/osx-tmp-x86_64"; |
65 | | -#my $embedDirSourceARM64 = "$embedDirRoot/osx-tmp-arm64"; |
| 65 | +my $embedDirSourceARM64 = "$embedDirRoot/osx-tmp-arm64"; |
66 | 66 |
|
67 | 67 | CopyEmbedRuntimeBinaries($embedDirSourceX64, "$embedDirRoot/osx"); |
68 | | -#CopyEmbedRuntimeBinaries($embedDirSourceARM64, "$embedDirRoot/osx-arm64"); |
| 68 | +CopyEmbedRuntimeBinaries($embedDirSourceARM64, "$embedDirRoot/osx-arm64"); |
69 | 69 |
|
70 | 70 | # Merge stuff in the monodistribution directory |
71 | 71 | my $distDirRoot = "$buildsroot/monodistribution"; |
72 | 72 | my $distDirDestinationBin = "$buildsroot/monodistribution/bin"; |
73 | 73 | my $distDirDestinationLib = "$buildsroot/monodistribution/lib"; |
74 | 74 | my $distDirSourceBinX64 = "$distDirRoot/bin-osx-tmp-x86_64"; |
75 | | -#my $distDirSourceBinARM64 = "$distDirRoot/bin-osx-tmp-arm64"; |
| 75 | +my $distDirSourceBinARM64 = "$distDirRoot/bin-osx-tmp-arm64"; |
76 | 76 |
|
77 | 77 | # Should always exist because build_all would have put stuff in it, but in some situations |
78 | 78 | # depending on the options it may not. So create it if it does not exist |
|
91 | 91 | die("Expected source directory not found : $distDirSourceBinX64\n"); |
92 | 92 | } |
93 | 93 |
|
94 | | -#if (!(-d $distDirSourceBinARM64)) |
95 | | -#{ |
96 | | -#die("Expected source directory not found : $distDirSourceBinARM64\n"); |
97 | | -#} |
| 94 | +if (!(-d $distDirSourceBinARM64)) |
| 95 | +{ |
| 96 | +die("Expected source directory not found : $distDirSourceBinARM64\n"); |
| 97 | +} |
98 | 98 |
|
99 | 99 | for my $file ('mono') |
100 | 100 | { |
101 | | -#MergeIntoFatBinary("$distDirSourceBinX64/$file", "$distDirSourceBinARM64/$file", "$distDirDestinationBin/$file"); |
102 | | -system ('mv', "$distDirSourceBinX64/$file", "$distDirDestinationBin/$file"); |
| 101 | +MergeIntoFatBinary("$distDirSourceBinX64/$file", "$distDirSourceBinARM64/$file", "$distDirDestinationBin/$file"); |
| 102 | +#system ('mv', "$distDirSourceBinX64/$file", "$distDirDestinationBin/$file"); |
103 | 103 | } |
104 | 104 |
|
105 | 105 | for my $file ('pedump') |
|
108 | 108 | system ('mv', "$distDirSourceBinX64/$file", "$distDirDestinationBin/$file") eq 0 or die ("Failed to move '$distDirSourceBinX64/$file' to '$distDirDestinationBin/$file'."); |
109 | 109 | } |
110 | 110 |
|
111 | | -for my $file ('libMonoPosixHelper.dylib', 'libmono-native.dylib') |
| 111 | +for my $file ('libMonoPosixHelper.dylib') |
| 112 | +{ |
| 113 | +MergeIntoFatBinary("$embedDirSourceX64/$file", "$embedDirSourceARM64/$file", "$distDirDestinationLib/$file"); |
| 114 | +} |
| 115 | + |
| 116 | +for my $file ('libmono-native.dylib') |
112 | 117 | { |
113 | | -#MergeIntoFatBinary("$embedDirSourceX64/$file", "$embedDirSourceARM64/$file", "$distDirDestinationLib/$file"); |
| 118 | +# TODO: libmono-native.dylib may not get cross-compiled and can't merge into fat binary, something to check back later |
114 | 119 | print(">>> cp $embedDirSourceX64/$file $distDirDestinationLib/$file\n\n"); |
115 | 120 | system ('cp', "$embedDirSourceX64/$file", "$distDirDestinationLib/$file"); |
116 | 121 | } |
|
120 | 125 | print(">>> Clean up temporary arch specific build directories\n"); |
121 | 126 |
|
122 | 127 | rmtree("$distDirSourceBinX64"); |
123 | | -#rmtree("$distDirSourceBinARM64"); |
| 128 | +rmtree("$distDirSourceBinARM64"); |
124 | 129 | rmtree("$embedDirSourceX64"); |
125 | | -#rmtree("$embedDirSourceARM64"); |
| 130 | +rmtree("$embedDirSourceARM64"); |
126 | 131 | } |
127 | 132 | } |
128 | 133 |
|
|
0 commit comments