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

New code layout - breaking change in cpu_features_macros.h #194

Merged
merged 4 commits into from
Oct 28, 2021

Conversation

gchatelet
Copy link
Collaborator

@gchatelet gchatelet commented Oct 26, 2021

This commit helps with platform code separation (fixes #3). It should also help with the build as we can simply include all impl_*.c files regardless of OS / arch.

Note: this patch contains breaking changes in include/cpu_features_macros.h

  • CPU_FEATURES_OS_LINUX_OR_ANDROID does not exist anymore
  • CPU_FEATURES_OS_FREEBSD, CPU_FEATURES_OS_ANDROID and CPU_FEATURES_OS_LINUX are now mutually exclusive (i.e. CPU_FEATURES_OS_ANDROID does not imply CPU_FEATURES_OS_LINUX)
  • CPU_FEATURES_OS_DARWIN has been renamed into CPU_FEATURES_OS_MACOS to be able to target non-Mac Apple products (IOS, TV, WATCH). They are now targetable with CPU_FEATURES_OS_IPHONE. This matches Apple naming convention described in this stackoverflow.

if (CpuFeatures_StringView_IsEquals(key, str("Features"))) {
for (size_t i = 0; i < AARCH64_LAST_; ++i) {
kSetters[i](&info->features, CpuFeatures_StringView_HasWord(
value, kCpuInfoFlags[i], ' '));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kCpuInfoFlags undeclared variable

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx! This is not ready for review yet :-)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

understood, sorry :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready for review if you want to have a look @toor1245 .

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I'll see

@gchatelet gchatelet marked this pull request as draft October 27, 2021 11:58
@gchatelet gchatelet marked this pull request as ready for review October 27, 2021 12:39
@gchatelet gchatelet requested a review from Mizux October 27, 2021 12:39
@gchatelet gchatelet linked an issue Oct 27, 2021 that may be closed by this pull request
src/copy.h Show resolved Hide resolved
@gchatelet gchatelet changed the title New layout New code layout - breaking change in cpu_features_macros.h Oct 28, 2021
@gchatelet
Copy link
Collaborator Author

Thx for the review. Submitting now.

@gchatelet gchatelet merged commit deb2a61 into master Oct 28, 2021
@gchatelet gchatelet deleted the new_layout branch October 28, 2021 11:52
@gchatelet gchatelet added the API Change This PR introduced a change in the API that must be documented on next release label Oct 29, 2021
@gchatelet gchatelet added this to the v0.7.0 milestone Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Change This PR introduced a change in the API that must be documented on next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need better platform code separation
3 participants