Skip to content

Commit d3df349

Browse files
fanatidindutny
authored andcommitted
c: fix blobs visibility for SSE4.2
1 parent c010aed commit d3df349

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/implementation/c/compilation.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ export class Compilation {
7777
align = ` ALIGN(${blob.alignment})`;
7878
}
7979

80+
if (blob.alignment) {
81+
out.push('#ifdef __SSE4_2__');
82+
}
8083
out.push(`static const unsigned char${align} ${blob.name}[] = {`);
8184

8285
for (let i = 0; i < buffer.length; i += BLOB_GROUP_SIZE) {
@@ -103,6 +106,9 @@ export class Compilation {
103106
}
104107

105108
out.push(`};`);
109+
if (blob.alignment) {
110+
out.push('#endif /* __SSE4_2__ */');
111+
}
106112
}
107113
out.push('');
108114
}

0 commit comments

Comments
 (0)