GithubHelp home page GithubHelp logo

kinke / mingw-w64-crt Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 7.0 7.17 MB

Tailored light-weight MinGW-w64 C Runtime to be built by Clang on Win64 and linked to by Microsoft's linker.

License: Other

Shell 0.01% C 88.06% C++ 11.50% Objective-C 0.28% Assembly 0.15%

mingw-w64-crt's Introduction

mingw-w64-crt

Tailored light-weight MinGW-w64 C Runtime (on top of Microsoft's Visual C Runtime) to be built by Clang on Win64 and linked by Microsoft's linker.

It covers most of the C99 functionality missing in Microsoft's runtime (otherwise implemented in virtually all other C runtimes) and therefore simplifies code portability while allowing you to use common Windows compilers (MS, Intel etc.) and linkers instead of having to rely on the MinGW-w64 GCC eco-system.

Clang handles GCC-style C code very well and at the same time is able to output Windows COFF objects which may then be fed to the MS linker. So we use Clang to build a trimmed-down version of the MinGW-w64 runtime library and are then free to use it with all other MS-compatible compilers (e.g., the D compilers LDC and DMD on Win64). For example, we get back x87 floating-point (80 bits) support.

Prerequisites: Clang + LLVM >= 3.4 sources, Visual C++ >= 2010, Win64

  • Modify your Clang sources (in the tools\clang subdirectory of your LLVM source tree) via provided mingw-w64-crt\clang_3.4.patch. If you don't have a tool to apply patches, don't worry - the patch is extremely simple. Open it in a text editor and perform the self-explanatory changes manually.
  • Build Clang. If that's your first time: trust me, it's astonishingly smooth and painless. ;)
  • Open a Visual Studio Command Prompt (basically a cmd.exe instance with pre-set environment variables).
  • Make sure the directory containing your clang.exe is in your PATH environment variable, otherwise set it. E.g.: set PATH=C:\my-clang;%PATH%
  • Change to this repository's mingw-w64-crt subdirectory.
  • Execute compile.bat. Clang will compile all modules and put the generated object files into the obj subdirectory.
  • Execute link_dynamic.bat and/or link_static.bat to let the MS linker/librarian generate the DLL/static library for you. Note: you may need to adjust the library paths in link_dynamic.bat as I've used the Win8 SDK.

mingw-w64-crt's People

Contributors

kinke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.