packages feed

shake-language-c 0.9.0 → 0.9.1

raw patch · 3 files changed

+10/−6 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Changelog for shake-language-c +## v0.9.1++* Fix host architecture detection on Windows 10+ ## v0.9.0  * Add support for the Android *arm64-v8a* target architecture and drop support for specifying the toolchain version; this API breaking change requires a minimum Android NDK revision 11c
shake-language-c.cabal view
@@ -13,7 +13,7 @@ -- limitations under the License.  Name:         shake-language-c-Version:      0.9.0+Version:      0.9.1 Synopsis:     Utilities for cross-compiling with Shake Description:  This library provides <http://hackage.haskell.org/package/shake Shake> utilities for cross-compiling @C@, @C++@ and @ObjC@ code for various target platforms. Currently supported target platforms are Android, iOS, Linux, MacOS X, Windows\/MinGW and Google Portable Native Client (PNaCl). Supported host platforms are MacOS X, Linux and Windows. Category:     Development
src/Development/Shake/Language/C/Host/Windows.hs view
@@ -16,7 +16,7 @@   getHostToolChain ) where -import           Data.Char (isSpace)+import           Data.Char (isSpace, toLower) import           Development.Shake import           Development.Shake.Command import           Development.Shake.Language.C.Target@@ -31,10 +31,10 @@ getHostArch = do     Stdout out <- cmd "wmic os get osarchitecture"     let spec = map trim . lines $ out-    case spec of-        ("OSArchitecture":"32-Bit":_) -> return $ X86 I686-        ("OSArchitecture":"64-Bit":_) -> return $ X86 X86_64-        ("OSArchitecture":arch:_) -> error $ "Unknown host architecture " ++ arch+    case map (map toLower) spec of+        ("osarchitecture":"32-bit":_) -> return $ X86 I686+        ("osarchitecture":"64-bit":_) -> return $ X86 X86_64+        ("osarchitecture":arch:_) -> error $ "Unknown host architecture " ++ arch         _ -> error $ "Couldn't determine host architecture from " ++ show spec  getHostToolChain :: IO (Target, Action ToolChain)