Commit Graph

56 Commits

Author SHA1 Message Date
Andrew Kelley 9493738e54 Merge branch 'freebsd-up' of https://github.com/myfreeweb/zig into freebsd2 2018-11-19 17:24:41 -05:00
Andrew Kelley 085d049a08 aarch64 improvements
* support C ABI for all return types
 * don't include __aeabi_uldivmod & co on aarch64 since
   it's 64 bit
2018-11-17 11:21:00 -05:00
Andrew Kelley 40b7652a6d fix stack pointer register name on i386 2018-10-25 18:25:53 -04:00
Marc Tiehuis e2b9c153bd Add initial freebsd stdlib functionality
Trivial program now compiles with now warnings.
2018-10-20 15:15:01 +03:00
Andrew Kelley 5a3c02137e support building static libraries
closes #1493
closes #54
2018-10-09 13:15:14 -04:00
Andrew Kelley d40c4e7c89 Merge pull request #1429 from shawnl/arm64
initial arm64 support
2018-10-06 00:11:39 -04:00
Andrew Kelley a2abdb185f Merge remote-tracking branch 'origin/master' into llvm7 2018-09-16 10:51:58 -04:00
Andrew Kelley 67735c6f15 ability to disable cache. off by default except for...
...zig run, zig build, compiler_rt.a, and builtin.a
2018-09-11 00:32:40 -04:00
Shawn Landden 342cff28f5 initial arm64 support 2018-09-08 03:52:28 +00:00
Andrew Kelley c757984879 Merge remote-tracking branch 'origin/master' into llvm7 2018-06-18 14:51:23 -04:00
Andrew Kelley 92a36040b1 msp430 target: c_long is always 32 bits
closes #1125
2018-06-18 01:03:45 -04:00
Andrew Kelley e5956f23ca add target C int type information for msp430 target
closes #1125
2018-06-17 12:47:27 -04:00
Andrew Kelley 32dd98b19f Merge remote-tracking branch 'origin/master' into llvm7 2018-06-14 18:27:59 -04:00
Ben Noordhuis d464b25322 support --target-arch wasm32 (#1094)
Add wasm32 support to the build-obj, build-exe and build-lib commands
of the stage 1 compiler.  Wasm64 should work transparently once it's
supported in upstream LLVM.

To export a function:

    // lib.zig - for exposition, not necessary for this example
    pub use @import("add.zig");

    // add.zig
    export fn add(a: i32, b: i32) i32 {
        return a + b;
    }

To import a function:

    // cube.zig
    extern fn square(x: i32) i32;

    export fn cube(x: i32) i32 {
        return x * square(x);
    }
2018-06-09 22:39:22 -04:00
Andrew Kelley 1f96a86676 Merge remote-tracking branch 'origin/master' into llvm7 2018-05-26 12:06:08 -04:00
Andrew Kelley 967bad43a0 OpenBSD has the same C integer sizes as Linux
Thanks Jan S <jan.schreib@gmail.com> for this information

closes #1016
2018-05-16 20:18:38 -04:00
Andrew Kelley a6ae45145f add @newStackCall builtin function
See #1006
2018-05-12 17:35:15 -04:00
Andrew Kelley 5800faa318 update to latest llvm API 2018-04-04 18:27:52 -04:00
Andrew Kelley cca93908e6 Merge remote-tracking branch 'origin/master' into llvm7 2018-04-04 17:22:26 -04:00
Andrew Kelley b01c50d6fa find libc and zig std lib at runtime
this removes the following configure options:
 * ZIG_LIBC_LIB_DIR
 * ZIG_LIBC_STATIC_LIB_DIR
 * ZIG_LIBC_INCLUDE_DIR
 * ZIG_DYNAMIC_LINKER
 * ZIG_EACH_LIB_RPATH
 * zig's reliance on CMAKE_INSTALL_PREFIX

these options are still available as command line options, however,
the default will attempt to execute the system's C compiler to
collect system defaults for these values.

closes #870
2018-03-30 17:10:54 -04:00
Andrew Kelley 62668e3e6b update to llvm 7.0.0 2018-03-22 15:39:50 -04:00
Marc Tiehuis d6e84e325b Add WebAssembly output workaround for LLVM 6 2018-03-13 21:53:42 +13:00
Andrew Kelley b57cb04afc Merge remote-tracking branch 'origin/master' into llvm6 2018-03-08 10:59:24 -05:00
Andrew Kelley cc0f660ad2 unless hf is specified in target environ, assume soft floating point
closes #804
2018-03-06 16:57:41 -05:00
Andrew Kelley 5a8d87f504 Merge branch 'master' into llvm6 2018-01-08 10:34:45 -05:00
Andrea Orru e932919e68 Darwin -> MacOSX, added Zen. See #438 2018-01-06 23:10:53 -05:00
Andrew Kelley 3a600297ca Merge remote-tracking branch 'origin/master' into llvm6 2017-11-06 22:41:12 -05:00
Marc Tiehuis 795703a39c Add emit command-line option (#580)
Add emit command-line option
2017-11-03 09:09:33 -04:00
Andrew Kelley 188fd47a51 add missing environment 2017-11-02 21:54:24 -04:00
Andrew Kelley 9a99bd3a71 use llvm named structs for const values when possible
normally we want to use llvm types for constants. but
union constants (which are found inside enums) when
they are initialized with the non-most-aligned-member
must be unnamed structs.

these bubble up to all aggregate types. if a constant of
an aggregate type contains, recursively, a union constant
with a non-most-aligned-member initialized, the aggregate
typed constant must be unnamed too.

this fixes all the asserts that were coming in from
llvm master branch.
2017-11-02 21:54:24 -04:00
Andrew Kelley 94ec2190f8 update to llvm master 2017-11-02 21:54:24 -04:00
Andrew Kelley 08708ea4dc fix typo in target_can_exec logic 2017-09-30 20:10:09 -04:00
Andrew Kelley 845f22101b zig test on 64-bit windows runs 32-bit tests 2017-09-30 14:40:16 -04:00
Andrew Kelley eb0979189b add windows to test targets
cross-compiling hello world with no libc for windows is working
2017-08-31 11:41:58 -04:00
Andrew Kelley 0e9bdb44a6 test suite cross-compile builds tests for other targets 2017-08-30 14:55:26 -04:00
Andrew Kelley 2bd6c60752 update for llvm 5.0.0rc1 2017-08-26 00:34:40 -04:00
Andrew Kelley a0a57beed5 fix invalid target info 2017-08-06 18:14:46 -04:00
Andrew Kelley d8d45908fa building with mingw for windows 2017-05-23 00:26:12 -04:00
Andrew Kelley bf67427c67 fix crash when using zig to link
without explicit dynamic linker
2017-04-13 01:15:25 -04:00
Andrew Kelley 11a6550324 fix some -Wconversion errors 2017-04-10 20:02:39 -04:00
Andrew Kelley d65cd73a8b add support to use zig as a linker driver
closes #243

I also added --grep to ./run_tests if you want to single out
some specific tests
2017-04-05 07:49:40 -04:00
Andrew Kelley cd31f875a6 update to llvm 4.0 2017-03-10 02:29:01 -05:00
Andrew Kelley b9c943b066 tell LLVM the target sub arch type 2017-02-05 18:23:54 -05:00
Andrew Kelley cd7713b178 make --target-os freestanding work 2017-02-02 23:14:08 -05:00
Andrew Kelley 3239b3cb69 use size_t for indexes
protect against incorrect copies in debug mode
2016-09-19 11:54:01 -04:00
Andrew Kelley 4e7effd3d3 port to llvm 3.9 2016-09-04 18:30:40 -07:00
Andrew Kelley ed50bd1b65 progress toward stack trace printing 2016-08-17 20:11:04 -07:00
Andrew Kelley 76e1541803 update to llvm 3.8.0 2016-03-08 18:56:14 -07:00
Andrew Kelley 58c13aa949 rename 'environ' to 'env_type'
environ appears to clash with another symbol in mingw land
2016-02-16 20:03:41 -07:00
Andrew Kelley c6bf9c6942 MacOS has the same int sizes as Linux
Source: https://developer.apple.com/library/mac/documentation/Darwin/Conceptual/64bitPorting/transition/transition.html
2016-02-15 16:26:33 -07:00