-
Notifications
You must be signed in to change notification settings - Fork 100
build: feature gate arch and cpu specific code #316
Conversation
@@ -22,14 +22,23 @@ and each such struct has a `setup()` method that configures the hardware | |||
*/ | |||
|
|||
|
|||
#[cfg(feature = "mcu_lpc17xx")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's actually a bad idea I guess, as it feature-gates mcu code from being unit tested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But wouldn't you then just test with the features enabled (which we already do)? As a bonus it has exposed some misuse of hal code. I think this is the accepted way of doing it as features are kind of like optional dependencies (which you're allowed to test without). But you can also test with them (which we do with the matrix for travis & build tasks for jenkins).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean — test the specific parts of the mcu hal, like doing a volatilecell
replay verification for uart setup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, your comment actually makes sense to me now.
👍
Closes #303 |
It would be nice if rustc would pass This would get rid of the |
retest this please |
And this is why you don't use socat to proxy the requests into vm. LGTM though. |
build: feature gate arch and cpu specific code
This will make zinc compatible for compilation for the build system.
Eventually, we should move architecture specific code somewhere, but this will suffice until then.