Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow profiler development on arm64 macOS #2573

Merged
merged 1 commit into from
Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def self.pkg_config_missing?(command: $PKGCONFIG) # rubocop:disable Style/Global
suggested: GET_IN_TOUCH,
)

architecture_not_supported unless RUBY_PLATFORM.start_with?('x86_64', 'aarch64')
architecture_not_supported unless RUBY_PLATFORM.start_with?('x86_64', 'aarch64', 'arm64')
end

private_class_method def self.on_ruby_2_1?
Expand Down
12 changes: 10 additions & 2 deletions spec/datadog/profiling/native_extension_helpers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,17 @@
context 'when macOS testing override is enabled' do
around { |example| ClimateControl.modify('DD_PROFILING_MACOS_TESTING' => 'true') { example.run } }

before { stub_const('RUBY_PLATFORM', 'x86_64-darwin19') }
context 'when on amd64 (x86-64) macOS' do
before { stub_const('RUBY_PLATFORM', 'x86_64-darwin19') }

include_examples 'supported ruby validation'
include_examples 'supported ruby validation'
end

context 'when on arm64 macOS' do
before { stub_const('RUBY_PLATFORM', 'arm64-darwin21') }

include_examples 'supported ruby validation'
end
end
end
end
Expand Down