Merge pull request #437 from sephiroth99/clang38

Use Clang 3.8 for Linux build.
This commit is contained in:
Ben Vanik 2015-10-17 01:13:47 -07:00
commit 8bc365e880
3 changed files with 8 additions and 9 deletions

View File

@ -34,14 +34,13 @@ get helpful spacers/movs in the disassembly.
### Linux
Linux support is extremely experimental and incomplete.
Linux support is extremely experimental and presently incomplete.
Only tested with GCC 4.9 on Ubuntu 14. [CodeLite](http://codelite.org) is the
IDE of choice and `xb premake` will spit out files for that. Make also works via
`xb build`.
The build script uses LLVM/Clang 3.8. GCC should also work, but is not easily
swappable right now.
Currently building requires that CC == CXX == g++. If you know a way around this
(to force .c files to be built with g++) let me know.
[CodeLite](http://codelite.org) is the IDE of choice and `xb premake` will spit
out files for that. Make also works via `xb build`.
## Running

View File

@ -30,7 +30,7 @@ class ElfModule : public xe::cpu::Module {
bool loaded() const { return loaded_; }
uint32_t entry_point() const { return entry_point_; }
const std::string& name() const { return name_; }
const std::string& name() const override { return name_; }
const std::string& path() const { return path_; }
bool Load(const std::string& name, const std::string& path,

View File

@ -503,8 +503,8 @@ class BaseBuildCommand(Command):
print('ERROR: don\'t know how to build on this platform.')
else:
# TODO(benvanik): allow gcc?
os.environ['CXX'] = 'clang++'
os.environ['CC'] = 'clang'
os.environ['CXX'] = 'clang++-3.8'
os.environ['CC'] = 'clang-3.8'
result = shell_call([
'make',
'-Cbuild/',