zig/test
Stephen Gutekanst 9836f1b2f9
add support for compiling Objective-C++ code (#10096)
* add support for compiling Objective-C++ code

Prior to this change, calling `step.addCSourceFiles` with Obj-C++ file extensions
(`.mm`) would result in an error due to Zig not being aware of that extension.
Clang supports an `-ObjC++` compilation mode flag, but it was only possible to use
if you violated standards and renamed your `.mm` Obj-C++ files to `.m` (Obj-C) to
workaround Zig being unaware of the extension.

This change makes Zig aware of `.mm` files so they can be compiled, enabling compilation
of projects such as [Google's Dawn WebGPU](https://dawn.googlesource.com/dawn/) using
a `build.zig` file only.

Helps hexops/mach#21

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>

* test/standalone: add ObjC++ compilation/linking test

Based on the existing objc example, just tweaked for ObjC++.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-22 08:44:49 +01:00
..
behavior stage2: LLVM backend: memset to 0xaa for undefined stores 2021-11-16 17:46:39 -07:00
src
stage1/c_abi
stage2 wasm: Fix text cases and add pointer test cases 2021-11-21 21:07:55 +01:00
standalone add support for compiling Objective-C++ code (#10096) 2021-11-22 08:44:49 +01:00
assemble_and_link.zig
behavior.zig cast -> cast_llvm, cast_c -> cast (doesn't work on LLVM backend) 2021-11-16 16:51:31 -07:00
cases.zig stage2: re-enable all tests 2021-11-19 22:41:10 +01:00
cli.zig
compare_output.zig
compile_errors.zig
gen_h.zig
run_translated_c.zig translate-c: coerce boolean results to c_int when negated 2021-11-20 19:52:06 -05:00
runtime_safety.zig
stack_traces.zig
standalone.zig add support for compiling Objective-C++ code (#10096) 2021-11-22 08:44:49 +01:00
tests.zig
translate_c.zig translate-c: Allow negative denominator in remainder (%) operator 2021-11-20 13:52:07 -05:00