diff options
author | Mike Klein <mtklein@chromium.org> | 2017-07-31 11:57:21 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-07-31 18:39:23 +0000 |
commit | c722f79b6c8919e1a8a0df6d4d7735c5a8a1b5e8 (patch) | |
tree | f85d2595f5545e2f01d89cc1cf2a0d412cb0d5ea /bin | |
parent | d301629d1dad5da36d6f8225f17b92a3f36eaf2a (diff) |
clang on windows support
1) Run python bin/fetch-clang-win
2) Set clang_win = "../bin/clang_win"
3) ???
4) Profit
Most changes here are to pass the right -mfoo flags to Clang
to enable advanced instruction sets, or fixed warning-as-errors.
BUG=skia:2679
Change-Id: Ieed145d35c209131c7c16fdd3ee11a3de4a1a921
Reviewed-on: https://skia-review.googlesource.com/28740
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'bin')
-rw-r--r-- | bin/fetch-clang-win | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/bin/fetch-clang-win b/bin/fetch-clang-win new file mode 100644 index 0000000000..06ff07b12c --- /dev/null +++ b/bin/fetch-clang-win @@ -0,0 +1,40 @@ +#!/usr/bin/env python + +# Copyright 2017 Google Inc. +# +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +VERSION = '308728-3' +MD5 = '8bec8c34da5d256e27638383667489e5' + +import hashlib +import os +import shutil +import tarfile +import urllib2 + +os.chdir(os.path.dirname(__file__)) + +if (not os.path.exists('clang_win/md5.txt') + or open('clang_win/md5.txt').read().strip() != MD5): + + # Clear out everything and start fresh. + shutil.rmtree('clang_win', ignore_errors=True) + os.mkdir('clang_win') + os.chdir('clang_win') + + # Grab the current Clang package. + with open(VERSION + '.tgz', 'wb') as tgz: + url = 'https://commondatastorage.googleapis.com/chromium-browser-clang' + tgz.write(urllib2.urlopen(url + '/Win/clang-' + VERSION + '.tgz').read()) + + # Extract it. + tarfile.open(VERSION + '.tgz').extractall() + + # Write out its hash to md5.txt so that next time is quicker. + h = hashlib.md5() + with open(VERSION + '.tgz', 'rb') as tgz: + h.update(tgz.read()) + with open('md5.txt', 'w') as md5: + md5.write(h.hexdigest()) |