Merge pull request #437 from sephiroth99/clang38
Use Clang 3.8 for Linux build.
This commit is contained in:
commit
8bc365e880
11
building.md
11
building.md
|
@ -34,14 +34,13 @@ get helpful spacers/movs in the disassembly.
|
||||||
|
|
||||||
### Linux
|
### 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
|
The build script uses LLVM/Clang 3.8. GCC should also work, but is not easily
|
||||||
IDE of choice and `xb premake` will spit out files for that. Make also works via
|
swappable right now.
|
||||||
`xb build`.
|
|
||||||
|
|
||||||
Currently building requires that CC == CXX == g++. If you know a way around this
|
[CodeLite](http://codelite.org) is the IDE of choice and `xb premake` will spit
|
||||||
(to force .c files to be built with g++) let me know.
|
out files for that. Make also works via `xb build`.
|
||||||
|
|
||||||
## Running
|
## Running
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ class ElfModule : public xe::cpu::Module {
|
||||||
|
|
||||||
bool loaded() const { return loaded_; }
|
bool loaded() const { return loaded_; }
|
||||||
uint32_t entry_point() const { return entry_point_; }
|
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_; }
|
const std::string& path() const { return path_; }
|
||||||
|
|
||||||
bool Load(const std::string& name, const std::string& path,
|
bool Load(const std::string& name, const std::string& path,
|
||||||
|
|
|
@ -503,8 +503,8 @@ class BaseBuildCommand(Command):
|
||||||
print('ERROR: don\'t know how to build on this platform.')
|
print('ERROR: don\'t know how to build on this platform.')
|
||||||
else:
|
else:
|
||||||
# TODO(benvanik): allow gcc?
|
# TODO(benvanik): allow gcc?
|
||||||
os.environ['CXX'] = 'clang++'
|
os.environ['CXX'] = 'clang++-3.8'
|
||||||
os.environ['CC'] = 'clang'
|
os.environ['CC'] = 'clang-3.8'
|
||||||
result = shell_call([
|
result = shell_call([
|
||||||
'make',
|
'make',
|
||||||
'-Cbuild/',
|
'-Cbuild/',
|
||||||
|
|
Loading…
Reference in New Issue