Skip to content

Commit

Permalink
add decision for msquic in arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
DrakenLibra committed Oct 31, 2023
1 parent efa9a6d commit 16d8b87
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,13 @@ check_msquic_dependencies:
sh -c "command -v cmake"

compile_msquic: check_msquic_dependencies update_submodule
ifeq ($(TARGET_CPU),arm64)
# 如果 TARGET_CPU 是 arm64,不运行 compile_msquic
else
mkdir -p ./dep/msquic/$(TARGET)
sed -i 's|\(^ *msquic_lib\)$$|\1 ALL|g' ./dep/msquic/src/bin/CMakeLists.txt
cmake -B./dep/msquic/$(TARGET) -S./dep/msquic -DQUIC_BUILD_SHARED=OFF -DCMAKE_TARGET_ARCHITECTURE=$(TARGET_CPU)
make -C./dep/msquic/$(TARGET) -j$(shell nproc)
@renameSymbols=$$(objdump -t ./dep/msquic/$(TARGET)/bin/Release/libmsquic.a | awk -v RS= '/_YB80VJ/{next}1' | grep -E 'g +(F|O) ' | grep -Evi ' (ms){0,1}quic' | awk '{print " --redefine-sym " $$NF "=" $$NF "_YB80VJ"}') && \
objcopy $$renameSymbols ./dep/msquic/$(TARGET)/bin/Release/libmsquic.a
objcopy $$renameSymbols ./dep/msquic/$(TARGET)/bin/Release/libmsquic.a
endif
14 changes: 14 additions & 0 deletions test/test_host_number_server.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

users:
id1:
secret: secret1
id2:
secret: secret2
id3:
secret: secret3
host:
number: 2
id4:
secret: secret4
host:
number: 2
16 changes: 16 additions & 0 deletions test/test_host_regex_server.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

users:
id1:
secret: secret1
id2:
secret: secret2
id3:
secret: secret3
host:
regex:
- ^[a-z]+$
id4:
secret: secret4
host:
regex:
- ^[a-z]+$
22 changes: 22 additions & 0 deletions test/test_tcp_number_server.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

users:
id1:
secret: secret1
id2:
secret: secret2
id3:
secret: secret3
id4:
secret: secret4
tcp:
- range: 41000-42000
- range: 42001-43000
id5:
secret: secret5
tcp:
- range: 51001-51999
id6:
secret: secret6
tcp:
- range: 50000-51000
- range: 52000-60000

0 comments on commit 16d8b87

Please sign in to comment.