Comments (4)
I think both 1&2 are the way to go. We'll disable weak support for win32 (I wonder why the clang developers don't have all the features enabled for that platform?) for now. Then we can give an additional way to override the defaulted selection with either UNITY_INCLUDE_WEAK or UNITY_EXCLUDE_WEAK.
We've been evolving towards this standard of guessing as much as we can, and then giving the developer support to override those settings with include/exclude options.
If you're feeling up to tweaking one of your versions to do this, that would be awesome. Otherwise, just say so and I'll tackle it when I get some time.
Thanks so much!
Mark
from unity.
I'm not sure why Clang's not including the weak attributes in the object code. I verified using nm
that when I compile with gcc
on Windows, the weak attribute is output, but with both clang
3.5.0 and 3.6.0 SVN r223387 it is missing.
I've tried playing around with #pragma weak setUp
etc, but that didn't help.
from unity.
Should Unity have an option to choose whether #pragma weak <symbol>
is to be used vs __attribute__((weak))
: UNITY_WEAK_PRAGMA
vs UNITY_WEAK_ATTRIBUTE
definitions to decide which syntax to use? For example, in unity.c
:
#if defined(UNITY_WEAK_ATTRIBUTE)
UNITY_WEAK_ATTRIBUTE void setUp(void) { }
UNITY_WEAK_ATTRIBUTE void tearDown(void) { }
#elif defined(UNITY_WEAK_PRAGMA)
# pragma weak setUp
void setUp(void);
# pragma weak tearDown
void tearDown(void);
#else
void setUp(void);
void tearDown(void);
#endif
UNITY_WEAK_ATTRIBUTE
could be set to __attribute__((weak))
for gcc and Clang or __weak
for Keil.
from unity.
I've merged your patch. Thanks so much!
from unity.
Related Issues (20)
- mistakenly opened issue
- closed HOT 1
- Issue with comparing the streams. HOT 2
- Possibly typo in test_unity_integers_64.c and test_unity_arrays.c HOT 1
- Avoid running the setup for some specific tests HOT 3
- #529 still unfixed after merge HOT 2
- PlatformIO failing to parse manifest on install.
- Game thing.com HOT 1
- How do I rename the `setUp` and `tearDown` functions? HOT 2
- Build fails with -Werror=missing-declarations when UNITY_USE_COMMAND_LINE_ARGS is enabled HOT 1
- XML/JSON based report generating? HOT 2
- Errr how u use this HOT 1
- Can you code on iPad using this app?
- I'm in secondary school first grade sooo i have no idea what I'm doing (I'm trying to tell but not expose my age) HOT 1
- Can you use this app to code on iPad?
- ssize_t asserts are missing
- Add Example for Testing using CMake
- Build fails when not using UNITY_USE_COMMAND_LINE_ARGS
- Feature Request: Support asymmetric range assertions HOT 2
- Some codes failed `-Werror=float-equal` compiler flag, please fix it.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unity.