As we all know, there are a lot of 3rd-party static library or framework used in iOS/OSX. Some of them are open-source, Apple re-compiles and embed them into the system library.
Now I change a few code in the open-source lib, or update its version. I want to use my own lib in my app. So that I need to compile it.
Since I don't know how Apple compiles them, including the macro, configuration and so on, re-compile in a different way may fall in an unexpected trap which is terrible and uncontrollable.
Here is an example:
I change the code of SQLite, which is a 3rd-party and open-source database library. Now I try to find out its compiler option. Luckily, SQLite has its own function to get the compiler option named sqlite3_compileoption_used and sqlite3_compileoption_get.
Notably: it's not a universal way. Not all open-source library has such convenience function like SQLite. I may not do the same thing in other libs.
And even such user-friendly like SQLite, I still lost something which is the cache_size pragma. It's 2000 by default, but Apple set it to 500 to make it better performance in iOS.
So I realize that it might not be a self-contained way to find out the compiler option. The best way might be the documentation from Apple or something else? Is it the compiler option public?
Aucun commentaire:
Enregistrer un commentaire