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

Remove tokens stripping in metadata generator by migrating to Clang 3.7 #227

Closed
3 tasks done
ivanbuhov opened this issue Jul 17, 2015 · 4 comments
Closed
3 tasks done
Assignees
Milestone

Comments

@ivanbuhov
Copy link
Contributor

We generate metadata for iOS 9 by stripping all Objective-C syntax from the header files which are not supported by Clang 3.6 (generics, __kindof, nullability modifiers). The stripping happens on the fly. It's a temporary(and ugly) solution. Clang 3.7 (it will be released at the end of August) is expected to support all these new Objective-C features and we have to migrate our metadata generator to use the new version of Clang. This will require some changes in our metadata generator. We will have to retrieve the generic information from the new APIs instead of stripping it on tokens level.
Although Clang 3.7 is not already released we can try to build it from its repo (where the needed changes are already merged) and spike (or fully implement) our metadata generator changes.

  • Try building Clang from latest source code (with homebrew)
  • Replace tokens stripping from metadata generator with the help of new APIs in Clang.
  • Migrate to Clang 3.7 when released officially.
@ivanbuhov ivanbuhov self-assigned this Jul 17, 2015
@PanayotCankov PanayotCankov mentioned this issue Jul 17, 2015
8 tasks
@jasssonpet jasssonpet changed the title Remove tokens strpping in metadata generator by migrating to Clang 3.7 Remove tokens stripping in metadata generator by migrating to Clang 3.7 Jul 17, 2015
@PanayotCankov PanayotCankov added this to the 1.3.0 (Under Review) milestone Jul 21, 2015
@ivanbuhov
Copy link
Contributor Author

To build and configure the metadata generator to use the latest LLVM from the repo:

  1. Run brew update
  2. Run brew install llvm --with-clang --with-rtti --HEAD. This will install the latest LLVM in /usr/local/Cellar/llvm/HEAD.
  3. Create symlink /usr/local/bin/llvm-config pointing to /usr/local/Cellar/llvm/HEAD/bin/llvm-config
  4. Change LLVM_CONFIG_EXE Cmake option in metadata generator project from /usr/local/bin/llvm-config-3.6 to /usr/local/bin/llvm-config

@ivanbuhov
Copy link
Contributor Author

I mananaged to generate valid metadata with the latest Clang (all tests pass). However, there are some issues to be fixed. The newest Clang is better in recognising toll-free bridged types, but for some of them we can't find the bridged type.

@fealebenpae
Copy link
Contributor

LLVM 3.7 was supposed to be out on August 21, but as of August 25 they are still at rc3. Unfortunately we won't be able to ship the newest Clang with the 1.3 release.

@fealebenpae fealebenpae modified the milestones: 1.4.0 (Under review), 1.3.0 Aug 25, 2015
@ivanbuhov ivanbuhov assigned ivanbuhov and unassigned fealebenpae Sep 25, 2015
@ivanbuhov
Copy link
Contributor Author

Resolved: #332

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants