Skip to content

Commit acb4056

Browse files
authored
Fix macos arm64 local build (#3962)
1 parent 5886146 commit acb4056

File tree

7 files changed

+9
-8
lines changed

7 files changed

+9
-8
lines changed

build/Build.Steps.MacOS.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ partial class Build
4646
{
4747
// Create home directory
4848
var source = NativeProfilerProject.Directory / "bin" / $"{NativeProfilerProject.Name}.dylib";
49-
var dest = TracerHomeDirectory / "osx-x64";
49+
var platform = Platform.ToString().ToLowerInvariant();
50+
var dest = TracerHomeDirectory / $"osx-{platform}";
5051
Log.Information($"Copying '{source}' to '{dest}'");
5152

5253
source.CopyToDirectory(dest, ExistsPolicy.FileOverwrite);

examples/demo/docker-compose.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: "3.8"
21
services:
32

43
client:

examples/playground/run.sh

100644100755
File mode changed.

instrument.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ if [ -z "$OS_TYPE" ]; then
2121
fi
2222

2323
# guess OS architecture if not provided
24+
ARCHITECTURE=${ARCHITECTURE:-}
2425
if [ -z "$ARCHITECTURE" ]; then
2526
case $(uname -m) in
26-
x86_64) ARCHITECTURE="x64" ;;
27-
aarch64) ARCHITECTURE="arm64" ;;
27+
x86_64) ARCHITECTURE="x64" ;;
28+
aarch64|arm64) ARCHITECTURE="arm64" ;;
2829
esac
2930
fi
3031

@@ -47,7 +48,7 @@ case "$OS_TYPE" in
4748
DOTNET_RUNTIME_ID="linux-musl-$ARCHITECTURE"
4849
;;
4950
"macos")
50-
DOTNET_RUNTIME_ID="osx-x64"
51+
DOTNET_RUNTIME_ID="osx-$ARCHITECTURE"
5152
;;
5253
"windows")
5354
;;

src/OpenTelemetry.AutoInstrumentation.AdditionalDeps/OpenTelemetry.AutoInstrumentation.AdditionalDeps.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<Platform>x64</Platform>
2323
<StorePath>$(StoreOutputBasePath)</StorePath>
2424
</StoreRuntime>
25-
<StoreRuntime Include="arm64" Condition="$([MSBuild]::IsOSPlatform('Linux')) And '$(NukePlatform)' == 'arm64'">
25+
<StoreRuntime Include="arm64" Condition="'$(NukePlatform)' == 'arm64'">
2626
<Platform>arm64</Platform>
2727
<StorePath>$(StoreOutputBasePath)</StorePath>
2828
</StoreRuntime>

src/OpenTelemetry.AutoInstrumentation.Native/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ if (CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64 OR CMAKE_SYSTEM_PROCESSOR STREQUAL am
3939
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL x86 OR CMAKE_SYSTEM_PROCESSOR STREQUAL i686)
4040
message(STATUS "Architecture is x86")
4141
SET(ISX86 true)
42-
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64)
42+
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64 OR CMAKE_SYSTEM_PROCESSOR STREQUAL arm64)
4343
message(STATUS "Architecture is ARM64")
4444
SET(ISARM64 true)
4545
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL armv7l OR CMAKE_SYSTEM_PROCESSOR STREQUAL arm)

test/test-applications/integrations/dependency-libs/TestApplication.ContinuousProfiler.NativeDep/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ if (CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64 OR CMAKE_SYSTEM_PROCESSOR STREQUAL am
3939
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL x86 OR CMAKE_SYSTEM_PROCESSOR STREQUAL i686)
4040
message(STATUS "Architecture is x86")
4141
SET(ISX86 true)
42-
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64)
42+
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64 OR CMAKE_SYSTEM_PROCESSOR STREQUAL arm64)
4343
message(STATUS "Architecture is ARM64")
4444
SET(ISARM64 true)
4545
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL armv7l OR CMAKE_SYSTEM_PROCESSOR STREQUAL arm)

0 commit comments

Comments
 (0)