| 
									
										
										
										
											2020-10-20 17:50:20 -07:00
										 |  |  | # | 
					
						
							|  |  |  | # Configures the BPF SDK environment | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if [ -z "$bpf_sdk" ]; then | 
					
						
							|  |  |  |   bpf_sdk=. | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Ensure the sdk is installed | 
					
						
							|  |  |  | "$bpf_sdk"/scripts/install.sh | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Use the SDK's version of llvm to build the compiler-builtins for BPF | 
					
						
							| 
									
										
										
										
											2021-02-18 11:30:08 -08:00
										 |  |  | export CC="$bpf_sdk/dependencies/bpf-tools/llvm/bin/clang" | 
					
						
							|  |  |  | export AR="$bpf_sdk/dependencies/bpf-tools/llvm/bin/llvm-ar" | 
					
						
							|  |  |  | export OBJDUMP="$bpf_sdk/dependencies/bpf-tools/llvm/bin/llvm-objdump" | 
					
						
							|  |  |  | export OBJCOPY="$bpf_sdk/dependencies/bpf-tools/llvm/bin/llvm-objcopy" | 
					
						
							| 
									
										
										
										
											2021-05-29 01:14:53 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | export RUSTFLAGS="-C lto=no -C opt-level=2" |