diff options
Diffstat (limited to 'openmp/libomptarget/src/rtl.cpp')
-rw-r--r-- | openmp/libomptarget/src/rtl.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/openmp/libomptarget/src/rtl.cpp b/openmp/libomptarget/src/rtl.cpp index 315252801fe..4eef9b29c4a 100644 --- a/openmp/libomptarget/src/rtl.cpp +++ b/openmp/libomptarget/src/rtl.cpp @@ -46,9 +46,8 @@ void RTLsTy::LoadRTLs() { #endif // OMPTARGET_DEBUG // Parse environment variable OMP_TARGET_OFFLOAD (if set) - char *envStr = getenv("OMP_TARGET_OFFLOAD"); - if (envStr && !strcmp(envStr, "DISABLED")) { - DP("Target offloading disabled by environment\n"); + TargetOffloadPolicy = (kmp_target_offload_kind_t) __kmpc_get_target_offload(); + if (TargetOffloadPolicy == tgt_disabled) { return; } @@ -216,7 +215,6 @@ void RTLsTy::RegisterLib(__tgt_bin_desc *desc) { if (!R.isUsed) { // Initialize the device information for the RTL we are about to use. DeviceTy device(&R); - size_t start = Devices.size(); Devices.resize(start + R.NumberOfDevices, device); for (int32_t device_id = 0; device_id < R.NumberOfDevices; |