# wasm-linker: emit \`target_features\` section · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/777bcbf96871a0250664b9cabdea5dbf51e0e64d)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 777bcbf96871a0250664b9cabdea5dbf51e0e64d

Requested commit: 777bcbf96871a0250664b9cabdea5dbf51e0e64d

Commit: 777bcbf96871a0250664b9cabdea5dbf51e0e64d

Tree: d32afcefc66379cebce92a2414887d6e84db7d25

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm-linker: emit `target_features` section

When the result is not being stripped, we emit the `target_features`
section based on all the used features. This includes features
inferred from linked object files.
Considering we know all possible features upfront, we can use an
array and therefore do not have to dynamically allocate memory.
Using this trick we can also easily order all features based
the same ordering as found in `std.Target.wasm` which is the same
ordering used by LLVM and the like.

```

## Parents

- [85b669d497641de383070353d50a6e4fd30abd49](https://git.cafe/gitcafe/zig/commit/85b669d497641de383070353d50a6e4fd30abd49?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/777bcbf96871a0250664b9cabdea5dbf51e0e64d?format=markdown)
